aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2017-07-24Added a test case with `markdown-latex_macros`.John MacFarlane1-1/+10
2017-07-24LaTeX reader: some improvements in macro parsing.John MacFarlane2-0/+9
Fixed applyMacros so that it operates on the whole string, not just the first token! Don't remove macro definitions from the output, even if Ext_latex_macros is set, so that macros will be applied. Since they're only applied to math in Markdown, removing the macros can have bad effects. Even for math macros, keeping them should be harmless.
2017-07-22HTML Reader: parse figure and figcaption (#3813)Mauro Bieg1-0/+45
2017-07-21Added TikiWiki reader (#3800)rlpowell3-0/+281
Added TikiWiki reader, including tests and documentation. It's probably not *complete*, but it works pretty well, handles all the basics (and some not-so-basics).
2017-07-21Muse reader: fix reading of lists inside tags (#3802)Alexander Krotov1-0/+28
2017-07-21LaTeX reader: handle optional args in raw `\titleformat`.John MacFarlane1-0/+6
Closes #3804.
2017-07-19LaTeX reader: fixed regression with starred environment names.John MacFarlane1-0/+10
Closes #3803.
2017-07-15Fix docx writer test for ghc 8.2.1.John MacFarlane1-1/+9
Workaround for different behavior of Data.Unique in different ghc versions.
2017-07-15Rearrange docx writer roundtrip test.John MacFarlane1-4/+4
I'm hoping this gives reproducible results on ghc 8.2.1.
2017-07-14Refactored compareOutput in docx writer testJohn MacFarlane1-7/+6
2017-07-13Add LaTeX xspace support (#3797)schrieveslaach1-0/+27
2017-07-12Fixed #3760. (#3784)Yuchen Pei2-4/+18
Using the same solution as in the LaTeX reader: equation -> displaymath align -> displaymath \begin{aligned} ... \end{aligned} etc..
2017-07-12Muse writer: indent lists inside <quote> with at least one space (#3795)Alexander Krotov2-3/+14
2017-07-12Make sure \write18 is parsed as raw LaTeX.John MacFarlane4-2/+19
The change is in the LaTeX reader's treatment of raw commands, but it also affects the Markdown reader.
2017-07-11HTML reader: Ensure that paragraphs are closed properly...John MacFarlane1-0/+7
when the parent block element closes, even without `</p>`. Closes #3794.
2017-07-07Rewrote LaTeX reader with proper tokenization.John MacFarlane12-8/+103
This rewrite is primarily motivated by the need to get macros working properly. A side benefit is that the reader is significantly faster (27s -> 19s in one benchmark, and there is a lot of room for further optimization). We now tokenize the input text, then parse the token stream. Macros modify the token stream, so they should now be effective in any context, including math. Thus, we no longer need the clunky macro processing capacities of texmath. A custom state LaTeXState is used instead of ParserState. This, plus the tokenization, will require some rewriting of the exported functions rawLaTeXInline, inlineCommand, rawLaTeXBlock. * Added Text.Pandoc.Readers.LaTeX.Types (new exported module). Exports Macro, Tok, TokType, Line, Column. [API change] * Text.Pandoc.Parsing: adjusted type of `insertIncludedFile` so it can be used with token parser. * Removed old texmath macro stuff from Parsing. Use Macro from Text.Pandoc.Readers.LaTeX.Types instead. * Removed texmath macro material from Markdown reader. * Changed types for Text.Pandoc.Readers.LaTeX's rawLaTeXInline and rawLaTeXBlock. (Both now return a String, and they are polymorphic in state.) * Added orgMacros field to OrgState. [API change] * Removed readerApplyMacros from ReaderOptions. Now we just check the `latex_macros` reader extension. * Allow `\newcommand\foo{blah}` without braces. Fixes #1390. Fixes #2118. Fixes #3236. Fixes #3779. Fixes #934. Fixes #982.
2017-06-30Updated jats tests for new texmath version.John MacFarlane1-1/+1
2017-06-30Markdown writer: Ensure that `+` and `-` are escaped properly...John MacFarlane1-0/+14
so they don't cause spurious lists. Previously they were only if succeeded by a space, not if they were at end of line. Closes #3773.
2017-06-29Added parameter for user data directory to runLuaFilter.John MacFarlane1-2/+2
in Text.Pandoc.Lua. Also to pushPandocModule. This change allows users to override pandoc.lua with a file in their local data directory, adding custom functions, etc. @tarleb, if you think this is a bad idea, you can revert this. But in general our data files are all overridable.
2017-06-29data/pandoc.lua: regularize constructors.John MacFarlane2-3/+3
We now use Pandoc instead of Doc (though Doc remains a deprecated Synonym), and we deprecate DoubleQuoted, SingleQuoted, InlineMath, and DisplayMath.
2017-06-29Lua filters: Remove special treatment of Quoted, Math.John MacFarlane1-2/+4
No more SingleQuoted, DoubleQuoted, InlineMath, DisplayMath. This makes everything uniform and predictable, though it does open up a difference btw lua filters and custom writers.
2017-06-28Muse reader: parse indented blockquotes (#3769)Alexander Krotov1-1/+6
2017-06-27RST reader: support anchors.John MacFarlane1-0/+17
E.g. `hello` .. _hello: paragraph This is supported by putting "paragraph" in a Div with id `hello`. Closes #262.
2017-06-27RST reader: Handle chained link definitions.John MacFarlane1-0/+9
For example, .. _hello: .. _goodbye: example.com Here both `hello` and `goodbye` should link to `example.com`. Fixes the first part of #262.
2017-06-27HTML reader: Use the lang value of <html> to set the lang meta value. (#3765)bucklereed1-0/+6
* HTML reader: Use the lang value of <html> to set the lang meta value. * Fix for pre-AMP environments.
2017-06-26Muse writer: fix hlint errors (#3764)Alexander Krotov1-2/+2
2017-06-26Muse reader: fix horizontal rule parsing (#3762)Alexander Krotov1-1/+12
Do not parse 3 dashes as horizontal rule and allow whitespace after rule
2017-06-25Muse reader: Require space before and after '=' for code (#3758)Alexander Krotov1-0/+8
2017-06-23Markdown reader: interpret YAML metadata as Inlines when possible.John MacFarlane1-0/+23
If the metadata field is all on one line, we try to interpret it as Inlines, and only try parsing as Blocks if that fails. If it extends over one line (including possibly the `|` or `>` character signaling an indented block), then we parse as Blocks. This was motivated by some German users finding that date: '22. Juin 2017' got parsed as an ordered list. Closes #3755.
2017-06-23Text.Pandoc.Extensions: Added `Ext_raw_attribute`.John MacFarlane1-0/+28
Documented in MANUAL.txt. This is enabled by default in pandoc markdown and multimarkdown.
2017-06-20Muse reader: check that headers start at the first column (#3749)Alexander Krotov1-0/+17
2017-06-20Fixed footnotes in table captions.John MacFarlane1-0/+27
Note that if the table has a first page header and a continuation page header, the notes will appear only on the first occurrence of the header. Closes #2378.
2017-06-19Muse reader: fix list item continuation parsing (#3747)Alexander Krotov1-0/+13
2017-06-19Added Vimwiki reader (#3705).Yuchen Pei3-0/+723
* New module Text.Pandoc.Readers.Vimwiki, exporting readVimwiki [API change]. * New input format `vimwiki`. * New data file, `data/vimwiki.css`, for displaying the HTML produced by this reader and pandoc's HTML writer in the style of vimwiki's own HTML export.
2017-06-19Add Muse reader (#3620)Alexander Krotov2-0/+266
2017-06-12Markdown writer: don't allow soft break in header.John MacFarlane1-0/+25
Closes #3736.
2017-06-11Don't allow backslash + newline to affect block structure.John MacFarlane3-5/+22
Note that as a result of this change, the following, which formerly produced a header with two lines separated by a line break, will now produce a header followed by a paragraph: # Hi\ there This may affect some existing documents that relied on this undocumented and unintended behavior. This change makes pandoc more consistent with other Markdown implementations, and with itself (since the two-space version of a line break doesn't work inside ATX headers, and neither version works inside Setext headers). Closes #3730.
2017-06-11Revert "Command tests: small change to try to fix appveyor failures."John MacFarlane1-4/+3
This reverts commit 0ab26ac9ebb0196691ec064820eac4e640f0d52c. Failed experiment.
2017-06-11Command tests: small change to try to fix appveyor failures.John MacFarlane1-3/+4
2017-06-11Support for \faCheck and \faClose (#3727)schrieveslaach1-0/+13
2017-06-11Switched Writer types to use Text.John MacFarlane12-19/+30
* XML.toEntities: changed type to Text -> Text. * Shared.tabFilter -- fixed so it strips out CRs as before. * Modified writers to take Text. * Updated tests, benchmarks, trypandoc. [API change] Closes #3731.
2017-06-10Changed all readers to take Text instead of String.John MacFarlane11-576/+598
Readers: Renamed StringReader -> TextReader. Updated tests. API change.
2017-06-01HTML writer: Avoid two class attributes when adding 'uri' class.John MacFarlane1-0/+6
Closes #3716.
2017-06-01Markdown writer: Avoid inline surround-marking with empty content.John MacFarlane1-0/+15
E.g. we don't want `<strong></strong>` to become `****`. Similarly for emphasis, super/subscript, strikeout. Closes #3715.
2017-06-01LaTeX reader: handle some width specifiers on table columns.John MacFarlane1-2/+2
Currently we only handle the form `0.9\linewidth`. Anything else would have to be converted to a percentage, using some kind arbitrary assumptions about line widths. See #3709.
2017-05-31Org reader: respect export option for tagsAlbert Krewinkel1-0/+6
Tags are appended to headlines by default, but will be omitted when the `tags` export option is set to nil. Closes: #3713
2017-05-31Org reader: include tags in headlinesAlbert Krewinkel1-17/+19
The Emacs default is to include tags in the headline when exporting. Instead of just empty spans, which contain the tag name as attribute, tags are rendered as small caps and wrapped in those spans. Non-breaking spaces serve as separators for multiple tags.
2017-05-31Org reader: recognize babel result blocks with attributesAlbert Krewinkel1-0/+44
Babel result blocks can have block attributes like captions and names. Result blocks with attributes were not recognized and were parsed as normal blocks without attributes. Fixes: #3706
2017-05-29LaTeX reader: handle escaped & inside table cell.John MacFarlane1-0/+15
Closes #3708.
2017-05-28Org reader: Fix cite parsing behaviourHerwig Stuetz1-0/+36
Until now, org-ref cite keys included special characters also at the end. This caused problems when citations occur right before colons or at the end of a sentence. With this change, all non alphanumeric characters at the end of a cite key are ignored. This also adds `,` to the list of special characters that are legal in cite keys to better mirror the behaviour of org-export.