Open ickc opened 2 years ago
In theory we could look for the pattern WORD + PERIOD + NBSP and look up the word in the abbreviation table. If it's found, we could replace the NBSP with a regular space.
The problem is that the abbreviation table is stored in reader options, and we don't have access to that in the writer. So this would not be a simple change.
With pandoc 2.17.0.1 on macOS,
MWE:
Note that the output of
echo 'Mr. A--B' | pandoc -t markdown
has a non-breaking space inMr. A--B
.From doc:
So the expected output should be
Mr. A--B
with a normal space.This problem manifested when using pandoc as a formatter as shown from the example.
Frankly I'm not sure if this is fixable as the AST lost the information already, and to un-smart non-breaking space may be too counter-intuitive? So may be just document this behavior?