aboutsummaryrefslogtreecommitdiff
path: root/src/Text
AgeCommit message (Collapse)Author
2017-12-03Removed unnecessary import.John MacFarlane
2017-12-03commonmark/gfm writer: use raw html for native divs/spans.John MacFarlane
This allows a pandoc markdown native div or span to be rendered in gfm using raw html tags.
2017-12-03HTML writer: export tagWithAttributes.John MacFarlane
This is a helper allowing other writers to create single HTML tags.
2017-12-03commonmark/gfm writer: implement `raw_html` and `raw_tex` extensions.John MacFarlane
Note that `raw_html` is enabled by default for `gfm`, while `raw_tex` is disabled by default.
2017-12-02Docx writer: allow empty paragraphs.John MacFarlane
See #2252. This also changes fixDisplayMath from Text.Pandoc.Writers.Shared so that it no longer produces empty Para as an artifact. (That was the original reason the writer omitted them.)
2017-12-02Docx reader: don't strip out empty paragraphs.John MacFarlane
We now have the `--strip-empty-paragraphs` option for that, if you want it. Closes #2252. Updated docx reader tests. We use stripEmptyParagraphs to avoid changing too many tests. We should add new tests for empty paragraphs.
2017-12-02Shared.blocksToInlines: rewrote using builder.John MacFarlane
This gives us automatic normalization, so we don't get for example two consecutive Spaces.
2017-12-02Add --strip-empty-paragraphs option.John MacFarlane
This works for any input format.
2017-12-02LaTeX writer: escape `_` in code with --listings.John MacFarlane
2017-12-01LaTeX writer: allow specifying just width or height for image size.John MacFarlane
Previously both needed to be specified (unless the image was being resized to be smaller than its original size). If height but not width is specified, we now set width to textwidth (and similarly if width but not height is specified). Since we have keepaspectratio, this yields the desired result.
2017-12-01LaTeX writer: escape ~ in code with --listings.John MacFarlane
Closes #4111.
2017-12-01Revert "LaTeX writer: Add keepaspectratio to includegraphics..."John MacFarlane
This reverts commit 171187a4527497701b3c77bd56cea2d770d4e3b0.
2017-12-01Lua/StackInstances: push Pandoc and Meta via constructorAlbert Krewinkel
Pandoc and Meta elements are now pushed by calling the respective constructor functions of the pandoc Lua module. This makes serialization consistent with the way blocks and inlines are pushed to lua and allows to use List methods with the `blocks` value.
2017-12-01List.lua: add missing fixes as discussed in #4099Albert Krewinkel
The changes were missing due to an error while using git.
2017-11-30LaTeX writer: Add keepaspectratio to includegraphics...John MacFarlane
...if only one of height/width is given.
2017-11-29Support beamer `\alert` in LaTeX reader. Closes #4091.John MacFarlane
2017-11-29Let papersizes a0, a1, a2, ... be case-insensitive in LaTeX and ConTeXt.John MacFarlane
2017-11-29Muse reader: correctly remove indentation from notesAlexander Krotov
Exactly one space is required and considered to be part of the marker.
2017-11-28Add basic lua List module (#4099)Albert Krewinkel
The List module is automatically loaded, but not assigned to a global variable. It can be included in filters by calling `List = require 'List'`. Lists of blocks, lists of inlines, and lists of classes are now given `List` as a metatable, making working with them more convenient. E.g., it is now possible to concatenate lists of inlines using Lua's concatenation operator `..` (requires at least one of the operants to have `List` as a metatable): function Emph (emph) local s = {pandoc.Space(), pandoc.Str 'emphasized'} return pandoc.Span(emph.content .. s) end Closes: #4081
2017-11-28Added --print-highlight-style option.John MacFarlane
This generates a JSON version of a highlighting style, which can be saved as a .theme file, modified, and used with `--highlight-style`. Closes #4106. Closes #4096.
2017-11-28Support `--webtex` for `gfm` output.John MacFarlane
2017-11-28make normalizeDate more forgiving (#4101)Mauro Bieg
also parse two-digit days, e.g. "April 20, 2017"
2017-11-27Fix --help output for --highlight-style to include FILE (#4098)Mauro Bieg
Closes #4095.
2017-11-27Muse reader: parse "~~" as non-breaking space in Emacs modeAlexander Krotov
2017-11-26Clearer deprecation warning for --latexmathml, --asciimathml, -m.John MacFarlane
Previously we only mentioned `--latexmathml`, even if `-m` was used.
2017-11-27Muse reader: make code blocks round tripAlexander Krotov
2017-11-26Muse reader: drop common space prefix from list itemsAlexander Krotov
2017-11-25Fix comment typo: s/elemnet/element/Alexander Krotov
2017-11-25Muse reader: don't interpret XML entitiesAlexander Krotov
2017-11-25Muse reader: remove `nested`Alexander Krotov
2017-11-24Muse reader: parse markup in definition list termsAlexander Krotov
2017-11-24Muse reader: allow definition to end with EOFAlexander Krotov
2017-11-24Muse writer: improve inline normalizationAlexander Krotov
2017-11-24Muse: move inline list normalization to writerAlexander Krotov
2017-11-22Org reader: allow empty list itemsAlbert Krewinkel
Fixes: #4090
2017-11-22Muse reader: allow list items to be emptyAlexander Krotov
2017-11-22Muse writer: escape hash symbolAlexander Krotov
2017-11-22Muse reader: don't allow blockquotes within listsAlexander Krotov
2017-11-22Muse reader: fix reading of multiline definitionsAlexander Krotov
2017-11-22Muse writer: escape "----" to avoid accidental horizontal rulesAlexander Krotov
2017-11-22Muse reader: concatenate inlines of the same typeAlexander Krotov
2017-11-22Muse writer: escape only </code> inside code tagAlexander Krotov
Additional <verbatim> is not needed as <code> is verbatim already.
2017-11-21Change Generic JSON instances to TemplateHaskell (#4085)Jasper Van der Jeugt
2017-11-21Add comment explaining why TH is used in Text.Pandoc.App.John MacFarlane
2017-11-21Change JSON instances for Opt to TemplateHaskell (#4083)Jasper Van der Jeugt
The `Generic` JSON instances for `Text.Pandoc.App.Opt` seem to tickle a particulary bad quadratic complexity case (Generics complexity is worse than quadratic with respect to the number of fields in the datatype). This is with GHC-8.2.1, I didn't test it using 8.0 but I assume it is similar. Using `Generic`, compilation of the `Text.Pandoc.App` module takes minutes and often gets killed due to out of memory on slower machines with "only" 8GB of accessible memory. This is particularly annoying to me since it means I cannot build pandoc on Travis. TemplateHaskell is a little uglier, but the module seems to compile within a few seconds, and compilation doesn't take more than 1GB of memory. Should I also change the other JSON instances throughout the codebase for consistency?
2017-11-21Muse reader: add inline <literal> supportAlexander Krotov
2017-11-21Muse reader: chop newlines after <literal> and before </literal>Alexander Krotov
2017-11-21Muse reader: <literal> has "style" attribute, not "format"Alexander Krotov
2017-11-21Recognize ".muse" file extensionAlexander Krotov
2017-11-19Allow spaces after `\(` and before `\)` with `tex_math_single_backslash`.John MacFarlane
Previously `\( \frac{1}{a} < \frac{1}{b} \)` was not parsed as math in `markdown` or `html` `+tex_math_single_backslash`.