mirror of
https://github.com/jgm/pandoc.git
synced 2026-10-30 18:24:28 +08:00
Typst writer: don't add a carriage return after \ for hard break.
They are not necessary. Note that they can still be included if you use `--wrap=preserve` and add a newline in your source document. This fixes issues with line breaks in headings. Closes #11446.
This commit is contained in:
@@ -443,7 +443,7 @@ inlineToTypst inline =
|
||||
WrapPreserve -> return cr
|
||||
WrapAuto -> return space
|
||||
WrapNone -> return space
|
||||
LineBreak -> return (space <> "\\" <> cr)
|
||||
LineBreak -> return (space <> "\\" <> space)
|
||||
Math mathType str -> do
|
||||
res <- convertMath TM.writeTypst mathType str
|
||||
case res of
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
columns: (30%, 30%, 20%, 20%),
|
||||
align: (center,left,left,left,),
|
||||
table.header(table.cell(align: center)[Name], table.cell(align: center)[Capital], table.cell(align: center)[Population
|
||||
\
|
||||
(in 2018)], table.cell(align: center)[Area \
|
||||
(in km#super[2])],),
|
||||
\ (in 2018)], table.cell(align: center)[Area \ (in km#super[2])],),
|
||||
table.hline(),
|
||||
[Denmark], [Copenhagen], [5,809,502], [43,094],
|
||||
[Finland], [Helsinki], [5,537,364], [338,145],
|
||||
|
||||
+1
-2
@@ -194,8 +194,7 @@ item.
|
||||
|
||||
Here's one with a bullet. \* criminey.
|
||||
|
||||
There should be a hard line break \
|
||||
here.
|
||||
There should be a hard line break \ here.
|
||||
|
||||
#horizontalrule
|
||||
|
||||
|
||||
Reference in New Issue
Block a user