Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New option to skip DocTitle transform in docutils (Fix #2382) #2442

Merged
merged 4 commits into from Aug 16, 2016

Conversation

ralsina
Copy link
Member

@ralsina ralsina commented Aug 15, 2016

Add a new option, defaulting to False, to skip the DocTitle transform in docutils, which has a very unexpected behaviour for most people.

@ralsina
Copy link
Member Author

ralsina commented Aug 15, 2016

Looks like I somehow broke python 2.7 in some random place and I have no idea why. Weeeee

@@ -177,11 +178,15 @@ class NikolaReader(docutils.readers.standalone.Reader):
def __init__(self, *args, **kwargs):
"""Initialize the reader."""
self.transforms = kwargs.pop('transforms', [])
docutils.readers.standalone.Reader.__init__(self, *args, **kwargs)
self.no_title_transform = kwargs.pop('no_title_transform', False)
super(NikolaReader, self).__init__(*args, **kwargs)
Copy link
Contributor

@felixfontein felixfontein Aug 15, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you forgot self as the first argument to the call to super's __init__.

@ralsina ralsina merged commit 880a50a into master Aug 16, 2016
@ralsina ralsina deleted the no-title-transform branch Aug 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants