mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-25 17:56:32 +00:00
Fix parsing of citations and quotes after parentheses.
Starting with pandoc 2.4, citations and quoted inlines
were no longer recognized after parentheses. This is
because of commit 9b0bd4ec6f,
which is reverted here.
The point of that commit was to allow relocation of
soft line breaks to before an abbreviation, so that
a nonbreaking space could be added after the
abbreviation. Now we simply leave the soft line
break in place, even though this means that
we won't get a nonbreaking space after "Mr."
at the end of a line (and in LaTeX this may
result in a longer intersentential space).
Those who care about this issue should take care
not to end lines with an abbreviation, or to
insert nonbreaking spaces manually.
Closes #5099.
This commit is contained in:
@@ -19,7 +19,7 @@ foo)
|
||||
cf.
|
||||
foo
|
||||
^D
|
||||
[Para [Str "cf.\160foo"]]
|
||||
[Para [Str "cf.",SoftBreak,Str "foo"]]
|
||||
```
|
||||
|
||||
```
|
||||
@@ -27,5 +27,5 @@ foo
|
||||
a cf.
|
||||
foo
|
||||
^D
|
||||
[Para [Str "a",SoftBreak,Str "cf.\160foo"]]
|
||||
[Para [Str "a",Space,Str "cf.",SoftBreak,Str "foo"]]
|
||||
```
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
```
|
||||
% pandoc -t native
|
||||
(@citation
|
||||
^D
|
||||
[Para [Str "(",Cite [Citation {citationId = "citation", citationPrefix = [], citationSuffix = [], citationMode = AuthorInText, citationNoteNum = 0, citationHash = 0}] [Str "@citation"]]]
|
||||
```
|
||||
|
||||
```
|
||||
% pandoc -t native
|
||||
('asd')
|
||||
^D
|
||||
[Para [Str "(",Quoted SingleQuote [Str "asd"],Str ")"]]
|
||||
```
|
||||
@@ -9,17 +9,6 @@ Mr. Bob
|
||||
[Para [Str "Mr.\160Bob"]]
|
||||
```
|
||||
|
||||
Here pandoc readjusts the softbreak so that the nonbreaking
|
||||
space can be inserted:
|
||||
|
||||
```
|
||||
% pandoc -t native
|
||||
Hi Mr.
|
||||
Bob
|
||||
^D
|
||||
[Para [Str "Hi",SoftBreak,Str "Mr.\160Bob"]]
|
||||
```
|
||||
|
||||
If you don't want this to happen you can escape the period:
|
||||
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user