-
-
Notifications
You must be signed in to change notification settings - Fork 128
Fix and enhance en/em dash translation #50
base: master
Are you sure you want to change the base?
Fix and enhance en/em dash translation #50
Conversation
I'm in favor of this change, and it's been proposed in Asciidoctor as well. See asciidoctor/asciidoctor#1174. |
Note that I haven't studied the implementation specifically here, I'm giving 👍 to the idea of supporting both types...however we decide is best. |
On 22 November 2014 07:24, Dan Allen [email protected] wrote:
The idea of being consistent if good, but the idea of breaking every Cheers
|
@elextr In Asciidoctor, I plan to tie this feature into the compat-mode setting. With compat-mode on, no breakage, old school behavior. With compat-mode off, you get the new syntax. |
Ok, I guess in Asciidoc the only solution is to guard it with an attribute, something like @christophjaeger pending a better idea, can you implement such an attribute? |
Why not use the |
Yes. Given that the Python2 implementation is unlikely to garner a huge number of incompatible changes, gathering them would probably be ok. Without the asciidoctor heuristic to set the |
I've actually done some of the https://github.com/asciidoctor/asciidoctor/blob/master/compat/asciidoc.conf#L38 |
Depending on the back-end being used, '--' gets currently translated either to an em dash (HTML, for instance) or an en dash (LaTeX). To allow convenient usage of both types of dashes and resolve this inconsistency, translate (in sync with LaTeX) '--' to en dash and '---' to em dash. In order to avoid "breaking" existing documents, introduce an attribute named 'compat-mode' that is defined by default and must be undefined to enable the en/em dash translation described above. Signed-off-by: Christoph Jaeger <[email protected]>
I did the following changes:
|
I'd like to hold off on integrating this until we get it into Asciidoctor as well so the processors move together on it. I plan to do additional research and add tests to make sure we are hitting all the edge cases. If we discover some additional conditions, we don't want to have to change behavior on users again. Better to do it all at once. See asciidoctor/asciidoctor#1174 for the related issue. |
@christophjaeger It seems this repo will no longer accept PR as the latest release has been cut a while ago but https://github.com/asciidoc/asciidoc-py3 would. |
Hello, what is the status and likely time frame for a solution about this? I'm eagerly waiting for convenient en-dashes since I started with using AsciiDoc, I'm sure many people are looking forward to this, especially from countries where em-dashes are used less/none at all. |
This will have to be something that is taken up in development of the AsciiDoc language specification, which is now getting underway. See https://projects.eclipse.org/proposals/asciidoc-language |
Depending on the back-end being used,
--
gets currently translated either to an em dash (HTML, for instance) or an en dash (LaTeX). To allow convenient usage of both types of dashes and resolve this inconsistency, translate (in sync with LaTeX)--
to en dash and---
to em dash.Well, this will "break" existing documents, of course—the AsciiDoc user guide, for instance.