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

Add support for German and French quotes #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ezag
Copy link

@ezag ezag commented Dec 22, 2017

Implement converting:

  • ,,German style quotes`` → „German style quotes“
  • <<French style quotes>> → «French style quotes»

Inspired by the PHP implementation.

Copy link
Contributor

@livibetter livibetter left a 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
Copy link
Contributor

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?

Copy link
Contributor

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.
Copy link
Contributor

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.

@livibetter
Copy link
Contributor

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.

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.

2 participants