Last active
August 29, 2015 14:15
-
-
Save komeda-shinji/15accda0973b2f343579 to your computer and use it in GitHub Desktop.
ReTextを使ってreStructuredTextで書いたときタイトルとサブタイトルが入らない ref: http://qiita.com/komeda-shinji/items/254442e911f507c65f97
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -u wpgen/wpgen.py wpgen/wpgen.py | |
--- wpgen/wpgen.py 2012-04-22 23:52:07.000000000 +0900 | |
+++ wpgen/wpgen.py 2012-04-27 22:00:58.000000000 +0900 | |
@@ -108,7 +109,8 @@ | |
pass | |
elif ext in (".rst", ".rest") and use_docutils: | |
parts = publish_parts(text, writer_name='html') | |
- html = parts['body'] | |
+ #html = parts['body'] | |
+ html = parts['html_body'] | |
if parts['title']: | |
pagename = parts['title'] | |
elif ext in (".htm", ".html") and bn != "template": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- markups/restructuredtext.py- 2014-07-23 19:32:40.000000000 +0900 | |
+++ markups/restructuredtext.py 2015-02-17 21:53:02.000000000 +0900 | |
@@ -53,7 +53,8 @@ | |
return self.publish_parts(text)['title'] | |
def get_document_body(self, text): | |
- return self.publish_parts(text)['body'] | |
+ #return self.publish_parts(text)['body'] | |
+ return self.publish_parts(text)['html_body'] | |
def get_stylesheet(self, text=''): | |
origstyle = self.publish_parts(text)['stylesheet'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment