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

Preceding text is discarded if acronym follows a non-breaking space #4

Open
jschlatow opened this issue Aug 13, 2020 · 0 comments
Open

Comments

@jschlatow
Copy link

Pandoc automatically inserts non-breaking spaces after abbreviations such as "e.g." and "i.e.".
As a consequence, the words processed by the Str function of this filter may actually contain whitespace characters.
However, the filter merely matches printable characters (not including spaces) via %g* to identify the text before/after the acronym.
As a result, text before a non-breaking space will be discarded.

This problem is reproducible by the following example:

Some text (e.g. (+FOOBAR))).

Which will produce the following LaTeX output:

Some text \gls{FOOBAR}.

I'd suggest to use a .* instead of a %g* to match the front and back part.

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

No branches or pull requests

1 participant