-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add support for German and French quotes #7
base: master
Are you sure you want to change the base?
Conversation
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.
I would suggest also writing tests.
Pinging @leohemsted, just in case you ain't aware of this PR and you ain't watching your own repo.
@@ -197,6 +204,7 @@ def smartypants(text, attr=None): | |||
|
|||
do_quotes = attr & Attr.q | |||
do_backticks = attr & Attr.mask_b | |||
do_commas = attr & Attr.c |
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.
This is quite ambiguous, shouldn't be "German" and "French" in the name?
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.
I would name it something like do_quotes_de
.
@@ -49,6 +49,13 @@ class for instantiation of module attribute :attr:`Attr`. | |||
""" | |||
mask_b = b | B | |||
|
|||
c = 1 << 10 | |||
""" | |||
flag for comma quotes (``,,``) and (``````) to curly ones. |
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.
Need to mention what they are for: German-style quotes.
By the way, @leohemsted, have you figured out any alternatives of PyPI docs hosting? You will need to find one or new features like this would be hard to be aware of, because no one would really dig into library codes. |
Implement converting:
,,German style quotes``
→ „German style quotes“<<French style quotes>>
→ «French style quotes»Inspired by the PHP implementation.