-
Notifications
You must be signed in to change notification settings - Fork 25
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
Render curved quotes #176
Comments
@xcoulon Can you give an example for this case? I have an issues that may or may not related to single/double quotes, to minimize duplicate issue which I want to report. Thank you. |
@shuLhan my case is that for text such as See https://asciidoctor.org/docs/user-manual/#curved. I'll edit the issue title and description to clarify. |
@shuLhan don't hesitate to open a new issue if you found a bug ;) |
So it turns out that I need this too (I used this syntax extensively in my docs). There are two dimensions of this problem. First, we need to support " Secondly, is the problem of automatically recognizing that a lone apostrophe should be curved when it appears without whitespace, along with the code to be smart about the use of "" to escape them. The particular rules also need to be savvy about I'm not entirely sure how best to solve this. The need is pressing for me, because I did use it heavily. I might just "fix" my documents to use replacements instead. I've got a solution which I think mostly does the right thing for apostrophes like mother's day, but a general solution to the explicit typographic entities is likely to be harder. |
Actually in this day and age, we have unicode. I know this is mean to be "ASCIIDOC", but really, there is no reason we can't inject UTF-8 explicit characters into place. That's what I would recommend folks do for now. |
See also #620. I am considering this bug to just be the handling of mother's day style markup, with a renderer time substitution (for now -- although we might want to do this at parse time in the future). |
So there are two cases to cover here.
It would be most natural to render these typographically using unicode on the backend, and then replace the unicode with an escaper for the asciidoctor compatible HTML. (Other backends should not use those escapes, and frankly are better off not doing so -- even in asciidoctor the epub backend leaves unicode unmolested.) |
This provides support for both explicit typographical quotes, and the implicit curved apostrophe when it appears between letters as in mother's day. This also refactors the handling of certain typographic symbols, moving their handing from the render to the parser, so that they are treated properly during the parse phase. (This was important in properly handling these curved quotes.) Also, the greedy rules for string elements in quoted text were removed, as they were interfering with the parse, and not strictly required. (They were an optimization.) It's our opinion that for most documents quoted text will be in the minority, such that the performance gain provided by the old rules was minimal at best. Fixes bytesparadise#176
This provides support for both explicit typographical quotes, and the implicit curved apostrophe when it appears between letters as in mother's day. This also refactors the handling of certain typographic symbols, moving their handing from the render to the parser, so that they are treated properly during the parse phase. (This was important in properly handling these curved quotes.) Also, the greedy rules for string elements in quoted text were removed, as they were interfering with the parse, and not strictly required. (They were an optimization.) It's our opinion that for most documents quoted text will be in the minority, such that the performance gain provided by the old rules was minimal at best. Fixes bytesparadise#176
This provides support for both explicit typographical quotes, and the implicit curved apostrophe when it appears between letters as in mother's day. This also refactors the handling of certain typographic symbols, moving their handing from the render to the parser, so that they are treated properly during the parse phase. (This was important in properly handling these curved quotes.) Also, the greedy rules for string elements in quoted text were removed, as they were interfering with the parse, and not strictly required. (They were an optimization.) It's our opinion that for most documents quoted text will be in the minority, such that the performance gain provided by the old rules was minimal at best. Fixes bytesparadise#176
See https://asciidoctor.org/docs/user-manual/#curved
The text was updated successfully, but these errors were encountered: