diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-12-11 15:58:11 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-12-11 23:55:08 -0800 |
commit | 536b6bf538a95f6db6ed41b72257f8b09fd26886 (patch) | |
tree | 384dc0790f9555b16df3789c4e1a80616eadd52d /src/Text/Pandoc/Writers/Custom.hs | |
parent | 63d875c6cbc9a8ac6b514982327a70df01d8a482 (diff) | |
download | pandoc-536b6bf538a95f6db6ed41b72257f8b09fd26886.tar.gz |
Implemented SoftBreak and new `--wrap` option.
Added threefold wrapping option.
* Command line option: deprecated `--no-wrap`, added
`--wrap=[auto|none|preserve]`
* Added WrapOption, exported from Text.Pandoc.Options
* Changed type of writerWrapText in WriterOptions from
Bool to WrapOption.
* Modified Text.Pandoc.Shared functions for SoftBreak.
* Supported SoftBreak in writers.
* Updated tests.
* Updated README.
Closes #1701.
Diffstat (limited to 'src/Text/Pandoc/Writers/Custom.hs')
-rw-r--r-- | src/Text/Pandoc/Writers/Custom.hs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Writers/Custom.hs b/src/Text/Pandoc/Writers/Custom.hs index e89828911..9671fc05b 100644 --- a/src/Text/Pandoc/Writers/Custom.hs +++ b/src/Text/Pandoc/Writers/Custom.hs @@ -276,6 +276,8 @@ inlineToCustom lua (Str str) = callfunc lua "Str" str inlineToCustom lua Space = callfunc lua "Space" +inlineToCustom lua SoftBreak = callfunc lua "SoftBreak" + inlineToCustom lua (Emph lst) = callfunc lua "Emph" lst inlineToCustom lua (Strong lst) = callfunc lua "Strong" lst @@ -308,11 +310,11 @@ inlineToCustom lua (RawInline format str) = inlineToCustom lua (LineBreak) = callfunc lua "LineBreak" -inlineToCustom lua (Link _ txt (src,tit)) = - callfunc lua "Link" txt src tit +inlineToCustom lua (Link attr txt (src,tit)) = + callfunc lua "Link" txt src tit (attrToMap attr) -inlineToCustom lua (Image _ alt (src,tit)) = - callfunc lua "Image" alt src tit +inlineToCustom lua (Image attr alt (src,tit)) = + callfunc lua "Image" alt src tit (attrToMap attr) inlineToCustom lua (Note contents) = callfunc lua "Note" contents |