aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
AgeCommit message (Collapse)AuthorFilesLines
2017-01-25Removed readerOldDashes and --old-dashes option, added old_dashes extension.John MacFarlane1-3/+1
API change. CLI option change.
2017-01-25Removed readerSmart and the --smart option; added Ext_smart extension.John MacFarlane6-9/+9
Now you will need to do -f markdown+smart instead of -f markdown --smart This change opens the way for writers, in addition to readers, to be sensitive to +smart, but this change hasn't yet been made. API change. Command-line option change. Updated manual.
2017-01-25Make Extensions a custom type instead of a Set Extension.John MacFarlane1-9/+9
The type is implemented in terms of an underlying bitset which should be more efficient. API change: from Text.Pandoc.Extensions export Extensions, emptyExtensions, extensionsFromList, enableExtension, disableExtension, extensionEnabled.
2017-01-25Removed `--normalize` option and normalization functions from Shared.John MacFarlane2-3/+7
* Removed normalize, normalizeInlines, normalizeBlocks from Text.Pandoc.Shared. These shouldn't now be necessary, since normalization is handled automatically by the Builder monoid instance. * Remove `--normalize` command-line option. * Don't use normalize in tests. * A few revisions to readers so they work well without normalize.
2017-01-25Added ReaderOptions parameter to readNative.John MacFarlane1-2/+4
This makes it similar to the other readers -- even though ReaderOptions is essentially ignored, the uniformity is nice.
2017-01-25RST reader: rebase-related fixes to warnings.John MacFarlane1-13/+12
2017-01-25RST reader: removed now unnecessary lifts.John MacFarlane1-8/+7
2017-01-25Markdown reader: Removed readMarkdownWithWarnings [API change].John MacFarlane1-10/+1
2017-01-25Have warningWithPos take a SourcePos rather than Maybe SourcePos.John MacFarlane3-8/+8
After all, we have warning if you don't want the source pos info.
2017-01-25LaTeX reader: add warning when parsing unescaped charactersJohn MacFarlane1-4/+5
that normally need escaping in LaTeX.
2017-01-25RST reader: implement start-after, end-before fields for include.John MacFarlane1-6/+12
2017-01-25RST reader: handle code, literal, number-lines, class, name for include.John MacFarlane1-30/+27
2017-01-25RST reader include: handle negative values for start-, end-line.John MacFarlane1-23/+30
2017-01-25RST reader: support start-line and end-line in include.John MacFarlane1-2/+8
Just skip other options for now.
2017-01-25RST reader: Simple `.. include::` support.John MacFarlane1-2/+65
TODO: handle the options (see comment in code). See #223.
2017-01-25LaTeX reader: Make sure we process includes in preamble.John MacFarlane1-0/+1
2017-01-25LaTeX reader: further fixes to include.John MacFarlane1-7/+11
2017-01-25Give source position for include file loop.John MacFarlane1-1/+1
2017-01-25LaTeX reader: Proper include file processing.John MacFarlane1-111/+33
* Removed handleIncludes from LaTeX reader [API change]. * Now the ordinary LaTeX reader handles includes in a way that is appropriate to the monad it is run in.
2017-01-25Removed readRSTWithWarnings (now useless).John MacFarlane1-10/+1
2017-01-25TWiki reader: Remove old readTWikiWithWarnings'.John MacFarlane1-18/+5
We get warnings for free now from PandocM. (And anyway, this reader doesn't generate any!)
2017-01-25Class: rename addWarning[WithPos] to warning[WithPos].John MacFarlane4-15/+15
There's already a function addWarning in Parsing! Maybe we can dispense with that now, but I still like 'warning' better as a name.
2017-01-25Class: Renamed 'warn' to 'addWarning' and consolidated RTF writer.John MacFarlane3-8/+8
* Renaming Text.Pandoc.Class.warn to addWarning avoids conflict with Text.Pandoc.Shared.warn. * Removed writeRTFWithEmbeddedImages from Text.Pandoc.Writers.RTF. This is no longer needed; we automatically handle embedded images using the PandocM functions. [API change]
2017-01-25Refactored math conversion in writers.John MacFarlane1-48/+0
* Remove exported module `Text.Pandoc.Readers.TeXMath` * Add exported module `Text.Pandoc.Writers.Math` * The function `texMathToInlines` now lives in `Text.Pandoc.Writers.Math` * Export helper function `convertMath` from `Text.Pandoc.Writers.Math` * Use these functions in all writers that do math conversion. This ensures that warnings will always be issued for failed math conversions.
2017-01-25Readers: pass errors straight up to PandocMonad.Jesse Rosenthal8-13/+8
Since we've unified error types, we can just throw the same error at the toplevel.
2017-01-25Remove redundant imports from OPML reader.Jesse Rosenthal1-2/+0
2017-01-25Unify Errors.Jesse Rosenthal15-20/+30
2017-01-25Add Text2Tags to Text.PandocJesse Rosenthal1-3/+3
2017-01-25Working on readers.Jesse Rosenthal24-1111/+1269
2017-01-25Changed readNative to use PandocMonad.John MacFarlane1-3/+6
2017-01-25Deleted whitespace at end of source lines.John MacFarlane2-3/+3
2017-01-25Added page breaks into Pandoc.Hubert Plociniczak2-10/+36
This requires an updated version of pandoc-types that introduces PageBreak definition. Not that this initial commit only introduces ODT pagebreaks and distinguishes for it page breaks before, after, or both, the paragraph, as read from the style definition.
2017-01-19Org reader: allow short hand for single-line raw blocksAlbert Krewinkel2-8/+17
Single-line raw blocks can be given via `#+FORMAT: raw line`, where `FORMAT` must be one of `latex`, `beamer`, `html`, or `texinfo`. Closes: #3366
2017-01-19MediaWiki reader: improved handling of display math.John MacFarlane1-2/+3
Sometimes display math is indented with more than one colon. Previously we handled these cases badly, generating definition lists and missing the math. Closes #3362.
2017-01-08Fixed -f markdown_github-hard_line_breaks+escaped_line_breaks.John MacFarlane1-0/+1
Previously this did not properly enable escaped line breaks. Closes #3341.
2017-01-06Remove pipe char irking the haddock coverage toolAlbert Krewinkel1-1/+1
Haddock documentation strings must be associated with functions. Remove pipe char from a comment that was moved into a `do` block in `Readers/Org/Inlines.hs`.
2017-01-06Org reader: accept org-ref citations followed by commasAlbert Krewinkel1-15/+16
Bugfix for an issue which, whenever the citation was immediately followed by a comma, prevented correct parsing of org-ref citations.
2017-01-05Org reader: ensure emphasis markup can be nestedAlbert Krewinkel1-0/+3
Nested emphasis markup (e.g. `/*strong and emphasized*/`) was interpreted incorrectly in that the inner markup was not recognized.
2017-01-05MediaWiki reader: Fix quotation mark parsing (#3336)tgkokk1-6/+3
Change MediaWiki reader's behavior when the smart option is parsed to match other readers' behavior. Fix #2012.
2016-12-24markdown reader: disallow space between inline code and attributes (#3326)Mauro Bieg1-2/+2
closes #3323
2016-12-13Docx reader: Empty header should be list of lists.Jesse Rosenthal1-9/+11
In the past, the docx reader wrote an empty header as an empty list. It should have the same width as a row (and be filled with empty cells). (Note that I've reordered the code here slightly to get rid of a call to `head`. It wasn't unsafe because it tested for null, but it was a bit of a smell.)
2016-12-08Docx reader: Ensure one-row tables don't have header.Jesse Rosenthal1-1/+2
Tables in MS Word are set by default to have special first-row formatting, which pandoc uses to determine whether or not they have a header. This means that one-row tables will, by default, have only a header -- which we imagine is not what people want. This change ensures that a one-row table is not understood to be a header only. Note that this means that it is impossible to produce a header-only table from docx, even though it is legal pandoc. But we believe that in nearly all cases, it will be an accidental (and unwelcome) result Closes #3285.
2016-12-08Removed debug trace from HTML reader.John MacFarlane1-2/+1
2016-12-07HTML reader: Understand `style=width:` as well as `width` in `col`.John MacFarlane1-2/+7
Closes #3286.
2016-12-07RST reader: print warnings when keys, substitition, notes not found.John MacFarlane1-6/+26
Previously the parsers failed and we got raw text. Now we get a link with an empty URL, or empty inlines in the case of a note or substitution.
2016-12-07RST reader: fix hyperlink aliases.John MacFarlane1-2/+10
`link <google_>`_ .. _google: https://google.com is really a reference link. Closes #3283.
2016-12-06Fixed some bad regressions in HTML table parser.John MacFarlane1-3/+3
This regression leads to the introduction of empty rows in some circumstances. Closes #3280.
2016-11-30Use new module from texmath to lookup MS font codepoints.John MacFarlane2-243/+1
+ Removed Text.Pandoc.Readers.Docx.Fonts + Moved its code to texmath; we now use (from texmath 0.9) Text.TeXMath.Unicode.Fonts + Use texmath 0.9 (currently from git). + Updated epub tests because texmath now handles more mathml.
2016-11-26HTML reader: improved table parsing.John MacFarlane1-11/+24
We now check explicitly for non-1 rowspan or colspan attributes, and fail when we encounter them. Previously we checked that each row had the same number of cells, but that could be true even with rowspans/colspans. And there are cases where it isn't true in tables that we can handle fine -- e.g. when a tr element is empty. So now we just pad rows with empty cells when needed. Closes #3027.
2016-11-26[odt] Infer table's caption from the paragraph (#3224)hubertp-lshift1-6/+21
ODT's reader always put empty captions for the parsed tables. This commit 1) checks paragraphs that follow the table definition 2) treats specially a paragraph with a style named 'Table' 3) does some postprocessing of the paragraphs that combines tables followed immediately by captions The ODT writer used 'TableCaption' style name for the caption paragraph. This commit follows the open office approach which allows for appending captions to table but uses a built-in style named 'Table' instead of 'TableCaption'. Any users of odt format (both writer and reader) are therefore required to change the style's name to 'Table', if necessary.