-
Notifications
You must be signed in to change notification settings - Fork 886
Fixed #414 parser ignoring value of tab_length
#415
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
Conversation
markdown/blockprocessors.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't super
be called here (and in all other subclassesd below)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you targeting compatibility with Python 2? If so, I'm not sure super()
would work in this context, because using it requires new style classes.
Also, a call to super()
seems like it would be inconsistent in the code base. In ListIndentProcessor.__init__(...)
method (line 144 in markdown/blockprocessors.py
), there is a call to BlockProcessor.__init__(...)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like I missed updating a class to new style classes in 794bffb. As the release notes stated (for 2.3 -- that was a while ago):
All classes are now “new-style” classes. In other words, all classes subclass from ‘object’.
However, I can clearly see that Blockprocessor does not. Looks like this whole file needs to be updated to be consistent with the rest of the library. If want to do that, great. If not, I'll take care of it myself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I'm happy to make this change. I'll update the pull request shortly.
@karepker if you address my two comments and fix the white space issues raised by the flake8 test I'll be happy to merge this. |
See my questions regarding the use of |
1 similar comment
Fixed #414 parser ignoring value of `tab_length`
Awesome. Thanks. |
Changed hard-coded numbers assuming tab length to be 4 to use
self.tab_length
.This change applies to he default parsers in
mardown/blockprocessors.py
and those inmarkdown/extensions/sane_lists.py
.All current tests should pass.