AsciiDoc writer: improve detection of intraword emphasis.
Closes #7803.
This commit is contained in:
parent
73e429dccb
commit
ea74582288
2 changed files with 27 additions and 1 deletions
|
@ -454,7 +454,7 @@ inlineListToAsciiDoc opts lst = do
|
||||||
_ -> False
|
_ -> False
|
||||||
isSpacy Start (Str xs)
|
isSpacy Start (Str xs)
|
||||||
| Just (c, _) <- T.uncons xs = isPunctuation c || isSpace c
|
| Just (c, _) <- T.uncons xs = isPunctuation c || isSpace c
|
||||||
isSpacy _ _ = False
|
isSpacy _ _ = True
|
||||||
|
|
||||||
setIntraword :: PandocMonad m => Bool -> ADW m ()
|
setIntraword :: PandocMonad m => Bool -> ADW m ()
|
||||||
setIntraword b = modify $ \st -> st{ intraword = b }
|
setIntraword b = modify $ \st -> st{ intraword = b }
|
||||||
|
|
26
test/command/7803.md
Normal file
26
test/command/7803.md
Normal file
|
@ -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]_,_
|
||||||
|
```
|
Loading…
Reference in a new issue