Sfoglia il codice sorgente

Fixed indent error

Barry Steyn 9 anni fa
parent
commit
45e8976a7b
1 ha cambiato i file con 12 aggiunte e 12 eliminazioni
  1. 12 12
      render_math/math.py

+ 12 - 12
render_math/math.py

@@ -114,7 +114,7 @@ def process_settings(pelicanobj):
 
 
         if key == 'process_escapes' and isinstance(value, bool):
         if key == 'process_escapes' and isinstance(value, bool):
             mathjax_settings[key] = 'true' if value else 'false'
             mathjax_settings[key] = 'true' if value else 'false'
-        
+
         if key == 'latex_preview':
         if key == 'latex_preview':
             try:
             try:
                 typeVal = isinstance(value, basestring)
                 typeVal = isinstance(value, basestring)
@@ -125,7 +125,7 @@ def process_settings(pelicanobj):
                 continue
                 continue
 
 
             mathjax_settings[key] = value
             mathjax_settings[key] = value
-        
+
         if key == 'color':
         if key == 'color':
             try:
             try:
                 typeVal = isinstance(value, basestring)
                 typeVal = isinstance(value, basestring)
@@ -136,23 +136,23 @@ def process_settings(pelicanobj):
                 continue
                 continue
 
 
             mathjax_settings[key] = value
             mathjax_settings[key] = value
-        
+
         if key == 'linebreak_automatic' and isinstance(value, bool):
         if key == 'linebreak_automatic' and isinstance(value, bool):
             mathjax_settings[key] = 'true' if value else 'false'
             mathjax_settings[key] = 'true' if value else 'false'
-        
+
         if key == 'process_summary' and isinstance(value, bool):
         if key == 'process_summary' and isinstance(value, bool):
             if value and BeautifulSoup is None:
             if value and BeautifulSoup is None:
                 print("BeautifulSoup4 is needed for summaries to be processed by render_math\nPlease install it")
                 print("BeautifulSoup4 is needed for summaries to be processed by render_math\nPlease install it")
                 value = False
                 value = False
 
 
             mathjax_settings[key] = value
             mathjax_settings[key] = value
-        
+
         if key == 'responsive' and isinstance(value, bool):
         if key == 'responsive' and isinstance(value, bool):
             mathjax_settings[key] = 'true' if value else 'false'
             mathjax_settings[key] = 'true' if value else 'false'
 
 
-	if key == 'force_tls' and isinstance(value, bool):
+        if key == 'force_tls' and isinstance(value, bool):
             mathjax_settings[key] = 'true' if value else 'false'       
             mathjax_settings[key] = 'true' if value else 'false'       
- 
+
         if key == 'responsive_break' and isinstance(value, int):
         if key == 'responsive_break' and isinstance(value, int):
             mathjax_settings[key] = str(value)
             mathjax_settings[key] = str(value)
 
 
@@ -205,7 +205,7 @@ def process_summary(article):
             full_text = content_parsed.find_all(class_='math')[len(math)-1].get_text()
             full_text = content_parsed.find_all(class_='math')[len(math)-1].get_text()
             math[-1].string = "%s ..." % full_text
             math[-1].string = "%s ..." % full_text
             summary = summary_parsed.decode()
             summary = summary_parsed.decode()
-  
+
         article._summary = "%s<script type='text/javascript'>%s</script>" % (summary, process_summary.mathjax_script)
         article._summary = "%s<script type='text/javascript'>%s</script>" % (summary, process_summary.mathjax_script)
 
 
 def configure_typogrify(pelicanobj, mathjax_settings):
 def configure_typogrify(pelicanobj, mathjax_settings):
@@ -242,7 +242,7 @@ def configure_typogrify(pelicanobj, mathjax_settings):
 
 
 def process_mathjax_script(mathjax_settings):
 def process_mathjax_script(mathjax_settings):
     """Load the mathjax script template from file, and render with the settings"""
     """Load the mathjax script template from file, and render with the settings"""
-    
+
     # Read the mathjax javascript template from file
     # Read the mathjax javascript template from file
     with open (os.path.dirname(os.path.realpath(__file__)) 
     with open (os.path.dirname(os.path.realpath(__file__)) 
             + '/mathjax_script_template', 'r') as mathjax_script_template:
             + '/mathjax_script_template', 'r') as mathjax_script_template:
@@ -319,10 +319,10 @@ def process_rst_and_summaries(content_generators):
     """
     """
     Ensure mathjax script is applied to RST and summaries are
     Ensure mathjax script is applied to RST and summaries are
     corrected if specified in user settings.
     corrected if specified in user settings.
-    
+
     Handles content attached to ArticleGenerator and PageGenerator objects,
     Handles content attached to ArticleGenerator and PageGenerator objects,
     since the plugin doesn't know how to handle other Generator types.
     since the plugin doesn't know how to handle other Generator types.
-    
+
     For reStructuredText content, examine both articles and pages.
     For reStructuredText content, examine both articles and pages.
     If article or page is reStructuredText and there is math present,
     If article or page is reStructuredText and there is math present,
     append the mathjax script.
     append the mathjax script.
@@ -330,7 +330,7 @@ def process_rst_and_summaries(content_generators):
     Also process summaries if present (only applies to articles)
     Also process summaries if present (only applies to articles)
     and user wants summaries processed (via user settings)
     and user wants summaries processed (via user settings)
     """
     """
-    
+
     for generator in content_generators:
     for generator in content_generators:
         if isinstance(generator, generators.ArticlesGenerator):
         if isinstance(generator, generators.ArticlesGenerator):
             for article in generator.articles:
             for article in generator.articles: