-
Notifications
You must be signed in to change notification settings - Fork 604
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 spaces to angle quotes for French guillemets #378
Comments
I can take a stab on this when I get some spare time, should not be too hard; but looking at this: https://en.wikipedia.org/wiki/Guillemet I guess we should add an option that should work for both "regular" and angled quotes, i.e. for gullimets in general. |
Do you mean enabling “quotes”, «double angle quotes» and « guillemets » (with Adding British-style ‘quotes’ would make the list complete, I think – cf. for instance LaTeX |
Currently we have:
If you add
If we add a new option:
Which, in both cases above, will insert |
Ok, so you would combine two |
I didn't know about the French use case, either -- but I don't care too much about the usefulness, it just makes sense and is the simplest way to add this. |
It has its own logic. If it's easier than adding an option like |
Wow, this baffles me a bit. Are you saying that there are cases in French when people write quoted text with extra spaces around it inside Guillemets? |
Yes, this is the norm: « TEXT » (though these are thin spaces in good typography). |
It baffles me as well, but it is documented in the Wikipedia article linked above: |
Damn, natural languages are weird :-)
Yeah, I missed that needle in the hay of information. |
It would be great to finalize french punctuation support according to #439 |
This commits adds flag `HTML_SMARTYPANTS_QUOTES_NBSP` which, when combined with `HTML_USE_SMARTYPANTS` will insert non-breaking spaces between the double quotes and the contained text. This is mostly relevant for use in French with `HTML_SMARTYPANTS_ANGLED_QUOTES`. It should not hurt existing code path in the performance department: ``` name old time/op new time/op delta SmartDoubleQuotes-4 2.58µs ± 1% 2.58µs ± 1% ~ (p=1.000 n=5+5) name old alloc/op new alloc/op delta SmartDoubleQuotes-4 5.27kB ± 0% 5.27kB ± 0% ~ (all samples are equal) name old allocs/op new allocs/op delta SmartDoubleQuotes-4 13.0 ± 0% 13.0 ± 0% ~ (all samples are equal) ``` Fixes russross#378
In 2014 support was added for angle quotes in BlackFriday thanks to @bep (#128). However, the French guillemets would also require non-breaking spaces: "this" should not become «that», but « that ».
Such further enhancement would make a great difference for French users, as mentioned in Hugo issue #3725.
The text was updated successfully, but these errors were encountered: