aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2017-12-01Lua/StackInstances: push Pandoc and Meta via constructorAlbert Krewinkel1-7/+5
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 Krewinkel1-1/+1
The changes were missing due to an error while using git.
2017-11-30LaTeX writer: Add keepaspectratio to includegraphics...John MacFarlane1-1/+6
...if only one of height/width is given.
2017-11-29Support beamer `\alert` in LaTeX reader. Closes #4091.John MacFarlane1-0/+1
2017-11-29Let papersizes a0, a1, a2, ... be case-insensitive in LaTeX and ConTeXt.John MacFarlane2-5/+8
2017-11-29Muse reader: correctly remove indentation from notesAlexander Krotov1-2/+2
Exactly one space is required and considered to be part of the marker.
2017-11-28Add basic lua List module (#4099)Albert Krewinkel1-5/+23
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 MacFarlane1-1/+26
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 MacFarlane2-9/+18
2017-11-28make normalizeDate more forgiving (#4101)Mauro Bieg1-1/+1
also parse two-digit days, e.g. "April 20, 2017"
2017-11-27Fix --help output for --highlight-style to include FILE (#4098)Mauro Bieg1-1/+1
Closes #4095.
2017-11-27Muse reader: parse "~~" as non-breaking space in Emacs modeAlexander Krotov1-0/+7
2017-11-26Clearer deprecation warning for --latexmathml, --asciimathml, -m.John MacFarlane1-1/+1
Previously we only mentioned `--latexmathml`, even if `-m` was used.
2017-11-27Muse reader: make code blocks round tripAlexander Krotov1-8/+16
2017-11-26Muse reader: drop common space prefix from list itemsAlexander Krotov1-11/+17
2017-11-25Fix comment typo: s/elemnet/element/Alexander Krotov1-1/+1
2017-11-25Muse reader: don't interpret XML entitiesAlexander Krotov1-6/+5
2017-11-25Muse reader: remove `nested`Alexander Krotov1-11/+2
2017-11-24Muse reader: parse markup in definition list termsAlexander Krotov1-2/+4
2017-11-24Muse reader: allow definition to end with EOFAlexander Krotov1-1/+1
2017-11-24Muse writer: improve inline normalizationAlexander Krotov1-0/+14
2017-11-24Muse: move inline list normalization to writerAlexander Krotov2-19/+13
2017-11-22Org reader: allow empty list itemsAlbert Krewinkel2-45/+42
Fixes: #4090
2017-11-22Muse reader: allow list items to be emptyAlexander Krotov1-2/+2
2017-11-22Muse writer: escape hash symbolAlexander Krotov1-1/+1
2017-11-22Muse reader: don't allow blockquotes within listsAlexander Krotov1-1/+2
2017-11-22Muse reader: fix reading of multiline definitionsAlexander Krotov1-2/+2
2017-11-22Muse writer: escape "----" to avoid accidental horizontal rulesAlexander Krotov1-4/+6
2017-11-22Muse reader: concatenate inlines of the same typeAlexander Krotov1-4/+18
2017-11-22Muse writer: escape only </code> inside code tagAlexander Krotov1-1/+1
Additional <verbatim> is not needed as <code> is verbatim already.
2017-11-21Change Generic JSON instances to TemplateHaskell (#4085)Jasper Van der Jeugt2-51/+22
2017-11-21Add comment explaining why TH is used in Text.Pandoc.App.John MacFarlane1-0/+2
2017-11-21Change JSON instances for Opt to TemplateHaskell (#4083)Jasper Van der Jeugt1-10/+6
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 Krotov1-0/+11
2017-11-21Muse reader: chop newlines after <literal> and before </literal>Alexander Krotov1-9/+13
2017-11-21Muse reader: <literal> has "style" attribute, not "format"Alexander Krotov1-1/+2
2017-11-21Recognize ".muse" file extensionAlexander Krotov1-0/+2
2017-11-19Allow spaces after `\(` and before `\)` with `tex_math_single_backslash`.John MacFarlane1-2/+2
Previously `\( \frac{1}{a} < \frac{1}{b} \)` was not parsed as math in `markdown` or `html` `+tex_math_single_backslash`.
2017-11-19Muse reader: count only one space as part of list item markerAlexander Krotov1-2/+2
2017-11-19Muse reader: produce SoftBreaks on newlinesAlexander Krotov1-18/+28
Now wrapping can be preserved with --wrap=preserve
2017-11-18HTML reader: ensure we don't produce level 0 headers,John MacFarlane1-5/+5
even for chapter sections in epubs. This causes problems because writers aren't set up to expect these. This fixes the most immediate problem in #4076. It would be good to think more about how to propagate the information that top-level headers are chapters from the reader to the writer.
2017-11-18Lua filters: preload text module (#4077)Albert Krewinkel1-0/+2
The `text` module is preloaded in lua. The module contains some UTF-8 aware string functions, implemented in Haskell. The module is loaded on request only, e.g.: text = require 'text' function Str (s) s.text = text.upper(s.text) return s end
2017-11-18Muse reader: Add Text::Amuse footnote extensionsAlexander Krotov1-6/+29
Footnote end is indicated by indentation, so footnotes can be placed anywhere in the text, not just at the end of it.
2017-11-16Introduce `HasSyntaxExtensions` typeclass (#4074)Alexander2-15/+20
+ Added new `HasSyntaxExtensions` typeclass for `ReaderOptions` and `WriterOptions`. + Reimplemented `isEnabled` function from `Options.hs` to accept both `ReaderOptions` and `WriterOptions`. + Replaced `enabled` from `CommonMark.hs` with new `isEnabled`.
2017-11-15Creole reader: Fix performance issue for longer lists. (#4075)Sascha Wilde1-1/+1
Fixes #4067.
2017-11-14Text.Pandoc.Parsing.uri: allow `&` and `=` as word characters.John MacFarlane1-1/+1
This fixes a bug where pandoc would stop parsing a URI with an empty attribute: for example, `&a=&b=` wolud stop at `a`. (The uri parser tries to guess which punctuation characters are part of the URI and which might be punctuation after it.) Closes #4068.
2017-11-14RST reader: better support for 'container' directive.John MacFarlane1-1/+3
Create a div, incorporate name attribute and classes. Closes #4066.
2017-11-14EPUB writer: Fixed path for cover image.John MacFarlane1-1/+1
It was previously `media/media/imagename`, and should have been `media/imagename`.
2017-11-14EPUB writer: fix paths for cover image.John MacFarlane1-2/+2
Closes #4069.
2017-11-13LaTeX reader: allow optional arguments on `\footnote`.John MacFarlane1-2/+2
Closes #4062.