mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-28 17:20:47 +08:00
@@ -584,11 +584,13 @@ escapeTypst smart context t =
|
||||
| needsEscapeAtLineStart c || isOrderedListMarker t
|
||||
-> afterBreak "\\"
|
||||
_ -> mempty) <>
|
||||
(literal (T.replace "//" "\\/\\/"
|
||||
(if T.any needsEscape t
|
||||
then T.concatMap escapeChar t
|
||||
else t)))
|
||||
literal (snd $ T.foldl' go ('\n', mempty) t)
|
||||
where
|
||||
go (lastc, t') c
|
||||
| needsEscape c = (c, t' <> escapeChar c)
|
||||
| c == '-', lastc == '-', smart = (c, t' <> T.pack ['\\',c])
|
||||
| c == '/', lastc == '/' = (c, t' <> T.pack ['\\',c])
|
||||
| otherwise = (c, T.snoc t' c)
|
||||
escapeChar c
|
||||
| c == '\160' = "~"
|
||||
| c == '\8217', smart = "'" -- apostrophe
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
% pandoc -f markdown-smart -t typst+smart
|
||||
"don't do it---"
|
||||
^D
|
||||
\"don\'t do it---\"
|
||||
\"don\'t do it-\-\-\"
|
||||
|
||||
```
|
||||
```
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
**Samsonov T.E.** Shape-Adaptive Geometric Simplification of Heterogeneous Line Datasets / T. E. Samsonov, O. P. Yakimova // International Journal of Geographical Information Science. — 2017. — Vol. 31. — № 8. — pp. 1485-1520.
|
||||
^D
|
||||
#strong[Samsonov T.E.] Shape-Adaptive Geometric Simplification of
|
||||
Heterogeneous Line Datasets / T. E. Samsonov, O. P. Yakimova \/\/
|
||||
Heterogeneous Line Datasets / T. E. Samsonov, O. P. Yakimova /\/
|
||||
International Journal of Geographical Information Science. --- 2017. ---
|
||||
Vol. 31. --- № 8. --- pp.~1485-1520.
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user