aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
AgeCommit message (Collapse)AuthorFilesLines
2017-11-02hlintAlexander Krotov6-27/+24
2017-11-01Really fix #3989.John MacFarlane1-5/+12
The previous fix only worked in certain cases. Other cases with `>` in an HTML attribute broke.
2017-11-01hlintAlexander Krotov2-6/+6
2017-10-31Fixed regression in parsing of HTML comments in markdown...John MacFarlane1-2/+3
and other non-HTML formats (`Text.Pandoc.Readers.HTML.htmlTag`). The parser stopped at the first `>` character, even if it wasn't the end of the comment. Closes #4019.
2017-11-01Merge pull request #4018 from swilde/creole-fixesJohn MacFarlane1-5/+7
Creole Reader: fix lists with triling white space
2017-10-31Creole reader: fixed some minor typos and formatting.Sascha Wilde1-4/+5
2017-10-31LaTeX reader: handle `%` comment right after command.John MacFarlane1-1/+1
For example \emph% {hi}
2017-10-31Markdown reader: make sure fenced div closers work in lists.John MacFarlane1-3/+11
Previously the following failed: ::: {.class} 1. one 2. two ::: and you needed a blank line before the closing `:::`.
2017-10-31Creole reader: fixed lists with trailing white space.Sascha Wilde1-1/+2
2017-10-30LaTeX reader: insert space when needed in macro expansion.John MacFarlane1-1/+8
Sometimes we need to insert a space after a control sequence to prevent it merging with a following letter. Closes #4007.
2017-10-30Allow unbraced arguments for macros.John MacFarlane1-8/+8
See #4007.
2017-10-30Allow body of macro definition to be unbraced.John MacFarlane1-7/+10
e.g. \newcommand\arrow\to See #4007.
2017-10-29Source code reformatting.John MacFarlane9-113/+111
2017-10-29More hlint fixes.John MacFarlane6-58/+54
2017-10-28Fix warning for older GHC versions.John MacFarlane1-1/+1
2017-10-27hlint suggestions.John MacFarlane20-288/+267
2017-10-27hlint changes.John MacFarlane6-100/+98
2017-10-27Automatic reformating by stylish-haskell.John MacFarlane26-305/+308
2017-10-27Consistent underline for Readers (#2270)hftf5-9/+14
* Added underlineSpan builder function. This can be easily updated if needed. The purpose is for Readers to transform underlines consistently. * Docx Reader: Use underlineSpan and update test * Org Reader: Use underlineSpan and add test * Textile Reader: Use underlineSpan and add test case * Txt2Tags Reader: Use underlineSpan and update test * HTML Reader: Use underlineSpan and add test case
2017-10-26update years in copyrightKolen Cheung1-2/+2
2017-10-26Creole reader (#3994)Sascha Wilde1-0/+316
This is feature complete but not very thoroughly tested yet.
2017-10-24HTML reader: close td/th should close any open block tag...John MacFarlane1-0/+2
Closes #3991.
2017-10-24HTML reader: td should close an open th or td.John MacFarlane1-0/+1
2017-10-24Revert "HTML reader: td or th implicitly closes blocks within last td/th."John MacFarlane1-5/+1
This reverts commit d2c4243f89a6368d4f9f8a511d9b026d0be19cd8.
2017-10-24HTML reader: td or th implicitly closes blocks within last td/th.John MacFarlane1-1/+5
2017-10-24Fenced divs: ensure that paragraph at end doesn't become Plain.John MacFarlane1-4/+9
Added test case.
2017-10-23Implemented fenced Divs.John MacFarlane1-0/+28
+ Added Ext_fenced_divs to Extensions (default for pandoc Markdown). + Document fenced_divs extension in manual. + Implemented fenced code divs in Markdown reader. + Added test. Closes #168.
2017-10-23HTML reader: `htmlTag` improvements.John MacFarlane1-8/+19
We previously failed on cases where an attribute contained a `>` character. This patch fixes the bug. Closes #3989.
2017-10-22LaTeX Reader: support \lettrinemb211-0/+1
2017-10-22LaTeX Reader: use opt function consistentlymb211-3/+3
2017-10-19LaTeX reader: be more forgiving in parsing command options.John MacFarlane1-2/+2
This was needed, for example, to make some minted options work.
2017-10-19LaTeX reader: Strip off quotes in `\include` filenames.John MacFarlane1-1/+2
2017-10-19LaTeX reader: support `\expandafter`.John MacFarlane1-6/+19
Closes #3983.
2017-10-19LaTeX reader: handle `\DeclareRobustCommand`.John MacFarlane1-2/+3
Currently it's just treated as a synonym for `\newcommand`. Handles the second case mentioned in #3983.
2017-10-17Latex reader: Skip spaces in image optionsBen Firshman1-0/+2
2017-10-16Improved handling of include files in LaTeX reader.John MacFarlane2-61/+81
Previously `\include` wouldn't work if the included file contained, e.g., a begin without a matching end. We've changed the Tok type so that it stores a full SourcePos, rather than just a line and column. So tokens keeep track of the file they came from. This allows us to use a simpler method for includes, which doesn't require parsing the included document as a whole. Closes #3971.
2017-10-08LaTeX reader: don't treat "..." as Quoted.John MacFarlane1-2/+0
This caused quotes to be omitted in `\texttt` contexts. Closes #3958. However, a better fix would be to modify the
2017-10-08Small logic fix.John MacFarlane1-2/+1
2017-10-08Org reader: end footnotes after two blank linesAlbert Krewinkel1-4/+5
Footnotes can not only be terminated by the start of a new footnote or a header, but also by two consecutive blank lines.
2017-10-06LaTeX reader: read polyglossia/babel \text($LANG){...}.bucklereed1-113/+129
2017-10-02Markdown reader: Fixed bug with indented code following raw LaTeX.John MacFarlane1-1/+1
Closes #3947.
2017-10-02Org reader: support `\n` export optionAlbert Krewinkel3-2/+5
The `\n` export option turns all newlines in the text into hard linebreaks. Closes #3950
2017-09-30Removed writerSourceURL, add source URL to common state.John MacFarlane2-9/+3
Removed `writerSourceURL` from `WriterOptions` (API change). Added `stSourceURL` to `CommonState`. It is set automatically by `setInputFiles`. Text.Pandoc.Class now exports `setInputFiles`, `setOutputFile`. The type of `getInputFiles` has changed; it now returns `[FilePath]` instead of `Maybe [FilePath]`. Functions in Class that formerly took the source URL as a parameter now have one fewer parameter (`fetchItem`, `downloadOrRead`, `setMediaResource`, `fillMediaBag`). Removed `WriterOptions` parameter from `makeSelfContained` in `SelfContained`.
2017-09-28Muse reader: parse anchorsAlexander Krotov1-1/+11
2017-09-26Muse reader: test metadata parsingAlexander Krotov1-2/+1
2017-09-26Fix a typo: s/collabarators/collaborators/Alexander Krotov1-1/+1
2017-09-25Org reader: update emphasis border charsAlbert Krewinkel1-3/+3
The org reader was updated to match current org-mode behavior: the set of characters which are acceptable to occur as the first or last character in an org emphasis have been changed and now allows all non-whitespace chars at the inner border of emphasized text (see `org-emphasis-regexp-components`). Fixes: #3933
2017-09-17Added `--strip-comments` option, `readerStripComments` in `ReaderOptions`.John MacFarlane2-7/+13
* Options: Added readerStripComments to ReaderOptions. * Added `--strip-comments` command-line option. * Made `htmlTag` from the HTML reader sensitive to this feature. This affects Markdown and Textile input. Closes #2552.
2017-09-16Markdown reader: added inlines, inlines1.John MacFarlane1-18/+23
Eventually we'll add `processEmphasis` and `processBracketed` to this. This will allow us to conform to CommonMark rules and fix #3903 and #1735.
2017-09-12Textile reader: allow 'pre' code in list item.John MacFarlane1-8/+4
Closes #3916.