Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: getnikola/nikola
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: e8cf4acec559
Choose a base ref
...
head repository: getnikola/nikola
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a2bf0a24d9b4
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Jul 12, 2015

  1. Copy the full SHA
    82f9f8c View commit details
  2. Making sure to also rescan for compiler extensions. Otherwise WordPre…

    …ss page compiler won't find shortcode plugins coming in the package.
    felixfontein committed Jul 12, 2015
    Copy the full SHA
    a2bf0a2 View commit details
Showing with 7 additions and 1 deletion.
  1. +7 −1 nikola/plugins/command/import_wordpress.py
8 changes: 7 additions & 1 deletion nikola/plugins/command/import_wordpress.py
Original file line number Diff line number Diff line change
@@ -80,6 +80,8 @@ def install_plugin(site, plugin_name, output_dir=None, show_install_notes=False)
return False
# Let the plugin manager find newly installed plugins
site.plugin_manager.collectPlugins()
# Re-scan for compiler extensions
site.compiler_extensions = site._activate_plugins_of_category("CompilerExtension")
return True


@@ -554,7 +556,11 @@ def transform_multiple_newlines(self, content):
def transform_content(self, content, post_format):
if post_format == 'wp':
if self.transform_to_html:
content = self.wordpress_page_compiler.compile_to_string(content)
additional_data = {}
try:
content = self.wordpress_page_compiler.compile_to_string(content, additional_data=additional_data)
except TypeError: # old versions of the plugin don't support the additional argument
content = self.wordpress_page_compiler.compile_to_string(content)
return content, 'html', True
elif self.use_wordpress_compiler:
return content, 'wp', False