diff options
| author | John MacFarlane <jgm@berkeley.edu> | 2022-01-05 14:48:19 -0800 |
|---|---|---|
| committer | John MacFarlane <jgm@berkeley.edu> | 2022-01-05 14:48:19 -0800 |
| commit | ea745822887bd91b34bd808d3037e3da8009a18e (patch) | |
| tree | 88bb5f45f4680157fd9184839746aea4cdbfebd5 | |
| parent | 73e429dccbca504db7e08bd0f345597d2067e09a (diff) | |
AsciiDoc writer: improve detection of intraword emphasis.
Closes #7803.
| -rw-r--r-- | src/Text/Pandoc/Writers/AsciiDoc.hs | 2 | ||||
| -rw-r--r-- | test/command/7803.md | 26 |
2 files changed, 27 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/AsciiDoc.hs b/src/Text/Pandoc/Writers/AsciiDoc.hs index 99c353c82..378d512b6 100644 --- a/src/Text/Pandoc/Writers/AsciiDoc.hs +++ b/src/Text/Pandoc/Writers/AsciiDoc.hs @@ -454,7 +454,7 @@ inlineListToAsciiDoc opts lst = do _ -> False isSpacy Start (Str xs) | Just (c, _) <- T.uncons xs = isPunctuation c || isSpace c - isSpacy _ _ = False + isSpacy _ _ = True setIntraword :: PandocMonad m => Bool -> ADW m () setIntraword b = modify $ \st -> st{ intraword = b } diff --git a/test/command/7803.md b/test/command/7803.md new file mode 100644 index 000000000..64547f470 --- /dev/null +++ b/test/command/7803.md @@ -0,0 +1,26 @@ +``` +% pandoc -f html -t asciidoc +<ul> +<li><a href=x.htm><i>Xx</i></a><i>,</i> +<li><a href=x.htm><i>Xx</i></a><i>,,</i> +<li><a href=x.htm><i>Xx</i></a><i>1</i> +<li><a href=x.htm><i>Xx</i></a>1<i>1</i> +<li><a href=x.htm><i>Xx</i></a><i>bcd</i> +<li><a href=x.htm><i>Xx</i></a>a<i>bcd</i> +<li><a href=x.htm><i>Xx</i></a>a<i>bcd</i>e +<li><a href=x.htm><i>Xx</i></a> <i>,</i> +<li><a href=x.htm><i>Xx</i></a>,<i>,</i> +<li><a href=x.htm>Xx</a><i>,</i> +</ul> +^D +* link:x.htm[_Xx_]_,_ +* link:x.htm[_Xx_]_,,_ +* link:x.htm[_Xx_]_1_ +* link:x.htm[_Xx_]1__1__ +* link:x.htm[_Xx_]_bcd_ +* link:x.htm[_Xx_]a__bcd__ +* link:x.htm[_Xx_]a__bcd__e +* link:x.htm[_Xx_] _,_ +* link:x.htm[_Xx_],_,_ +* link:x.htm[Xx]_,_ +``` |
