diff options
author | John MacFarlane <jgm@berkeley.edu> | 2019-01-07 22:10:34 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2019-01-07 22:10:34 -0800 |
commit | 599327bee1eac3662ec2ab32e32d794246940e25 (patch) | |
tree | 5a9c70e3def591284a5c51205002c833d50ea440 /src/Text/Pandoc/Writers | |
parent | c1d058aeb1c6a331a2cc22786ffaab17f7118ccd (diff) | |
download | pandoc-599327bee1eac3662ec2ab32e32d794246940e25.tar.gz |
Asciidoc writer: shorter delimiters for tables, blockquotes.
This matches asciidoctor reference docs.
Closes #4364.
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r-- | src/Text/Pandoc/Writers/AsciiDoc.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/AsciiDoc.hs b/src/Text/Pandoc/Writers/AsciiDoc.hs index 79ebcf2ea..9497d0be8 100644 --- a/src/Text/Pandoc/Writers/AsciiDoc.hs +++ b/src/Text/Pandoc/Writers/AsciiDoc.hs @@ -194,8 +194,7 @@ blockToAsciiDoc opts (BlockQuote blocks) = do let contents' = if any isBlock blocks then "--" $$ contents $$ "--" else contents - let cols = offset contents' - let bar = text $ replicate cols '_' + let bar = text "____" return $ bar $$ chomp contents' $$ bar <> blankline blockToAsciiDoc opts (Table caption aligns widths headers rows) = do caption' <- inlineListToAsciiDoc opts caption @@ -252,7 +251,7 @@ blockToAsciiDoc opts (Table caption aligns widths headers rows) = do else 100000 let maxwidth = maximum $ map offset (head':rows') let body = if maxwidth > colwidth then vsep rows' else vcat rows' - let border = text $ "|" ++ replicate (max 5 (min maxwidth colwidth) - 1) '=' + let border = text "|===" return $ caption'' $$ tablespec $$ border $$ head'' $$ body $$ border $$ blankline blockToAsciiDoc opts (BulletList items) = do |