Kaynağa Gözat

Don't use prettify, it affects source code display

Swaroop C H 12 yıl önce
ebeveyn
işleme
5d585ea57c
1 değiştirilmiş dosya ile 4 ekleme ve 1 silme
  1. 4 1
      fabfile.py

+ 4 - 1
fabfile.py

@@ -230,7 +230,7 @@ def replace_images_with_s3_urls(text):
     soup = BeautifulSoup(text)
     for image in soup.find_all('img'):
         image['src'] = upload_asset_to_s3(image['src'])
-    return soup.prettify()
+    return unicode(soup)
 
 
 def markdown_to_html(source_text, upload_assets_to_s3=False):
@@ -244,6 +244,9 @@ def markdown_to_html(source_text, upload_assets_to_s3=False):
     # http://wordpress.org/extend/plugins/raw-html/
     output = '<!--raw-->\n' + output + '\n<!--/raw-->'
 
+    # NOTE: Also assumes that you have added the CSS from
+    # `pandoc -S -t html5` to the `style.css` of your active Wordpress theme.
+
     if upload_assets_to_s3:
         output = replace_images_with_s3_urls(output)