aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
AgeCommit message (Collapse)AuthorFilesLines
2017-02-24Implemented `\graphicspath` in LaTeX reader.John MacFarlane1-1/+8
Closes #736.
2017-02-24EPUB reader: minor refactoring, avoiding explicit MediaBag handling.John MacFarlane1-8/+6
This all works behind the scenes in CommonState plumbing.
2017-02-22When parsing raw LaTeX commands, include trailing space.John MacFarlane1-2/+2
Otherwise things like `\noindent foo` break and turn into `\noindentfoo`. Affects `-f latex+raw_tex` and `-f markdown` (and other formats that allow `raw_tex`). Closes #1773.
2017-02-21MediaWiki reader: ensure that list starts begin at left margin.John MacFarlane1-9/+18
Including when they're in tables or other list items. Closes #2606.
2017-02-21MediaWiki reader: fixed more table issues.John MacFarlane1-9/+7
Closes #2649.
2017-02-21MediaWiki reader: Allow blank line after table start.John MacFarlane1-1/+1
See #2649.
2017-02-21MediaWiki tables: allow extra hyphens after `|-` in tables.John MacFarlane1-1/+1
I didn't see this documented anywhere, but it seems to be allowed (and common). See #2649. This addresses some of the cases there, but not all.
2017-02-20Tighten up HasQuoteContext instance in HTML reader.John MacFarlane1-1/+1
We constrain it to the state used in the HTML reader. Otherwise we can get overlap with the general instance for ParserState m.
2017-02-17Markdown reader: Use logMessage instead of report.John MacFarlane1-5/+7
2017-02-17Fixed repeated log messages in RST reader.John MacFarlane1-13/+14
See #3447. To complete fixes on this issue, we need to do the same for the other readers. Note that the changes required are minimal -- add reportLogMessages to the end of the main parser, and replace report with logMessage. (except for trace)
2017-02-15Fix indirect hyperlink targets. Closes #512.John MacFarlane1-23/+33
2017-02-14LaTeX reader: include contents of `\parbox`.John MacFarlane1-0/+1
2017-02-14Removed unnecessary import.John MacFarlane1-1/+1
2017-02-13LaTeX reader: properly handle column prefixes/suffixes.John MacFarlane1-12/+33
For example, in \begin{tabular}{>{$}l<{$}>{$}l<{$} >{$}l<{$}} each cell will be interpreted as if it has a `$` before its content and a `$` after (math mode).
2017-02-11RST reader: Support `.. line-block` directive.John MacFarlane1-2/+7
This is deprecated but may still be in older documents.
2017-02-11RST reader/writer: properly handle table captions.John MacFarlane1-1/+1
Currently the support for the `.. table` directive is a bit limited; we don't yet support the `widths` field. But at least you can have a proper captioned table.
2017-02-11RST reader: Initial support of .. table directive.John MacFarlane1-4/+21
This allows adding captions to tables.
2017-02-11Fixed small bug in RST list parsing.John MacFarlane1-3/+2
See #3432. Previously the parser didn't handle properly this case: * - a - b * - c - d
2017-02-11Use new warnings throughout the code base.John MacFarlane9-77/+69
2017-02-10Added Text.Pandoc.Logging (exported module).John MacFarlane6-2/+8
This now contains the Verbosity definition previously in Options, as well as a new LogMessage datatype that will eventually be used instead of raw strings for warnings. This will enable us, among other things, to provide machine-readable warnings if desired. See #3392.
2017-02-10LaTeX reader: Improved messages for skipped environments.John MacFarlane1-5/+13
2017-02-10LaTeX reader: Improved warning messages for unknown commands.John MacFarlane1-19/+23
2017-02-10HTML reader: Added warnings for ignored material.John MacFarlane1-5/+14
See #3392.
2017-02-09LaTeX reader: Issue warnings when skipping unknown latex commands.John MacFarlane1-4/+10
See #3392.
2017-02-08LaTeX reader: support `\lstinputlisting`.John MacFarlane1-11/+34
Closes #2116.
2017-02-07RST reader: Improved admonition support.John MacFarlane1-6/+8
* We no longer add an "admonition" class, we just use the class for the type of admonition, "note" for example. * We put the word corresponding to the label in a paragraph inside a div at the beginning of the admonition with class "admonition-title". * This is about as close as we can get to RST's own output. See #223.
2017-02-07Refactored some files formerly in LaTeX reader.John MacFarlane2-33/+6
* Export readFileFromDirs from Class. * Export insertIncludedFile from Parsing. Simplified code in LaTeX/RST readers.
2017-02-07Moved readFileFromDirs to Text.Pandoc.Class.John MacFarlane1-29/+9
This can be used in several different modules, not just LaTeX reader.
2017-02-07Refactored include file handling in LaTeX reader.John MacFarlane1-14/+16
2017-02-06Removed --parse-raw and readerParseRaw.John MacFarlane6-26/+23
These were confusing. Now we rely on the +raw_tex or +raw_html extension with latex or html input. Thus, instead of --parse-raw -f latex we use -f latex+raw_tex and instead of --parse-raw -f html we use -f html+raw_html
2017-02-03Docx reader: handle local namespace declarations.John MacFarlane2-107/+127
Previously we didn't recognize math, for example, when the xmlns declaration occured on the element and not the root. Now we recognize either. Closes #3365. This patch defines findChildByName, findChildrenByName, and findAttrByName in Util, and uses these in Parse.
2017-02-03Docx reader: Don't drop smartTag contents.John MacFarlane2-0/+8
This just parses inside smartTags and yields their contents, ignoring the attributes of the smartTag. @jkr, you may want to adjust this, but I wanted to get a fix in as fast as possible for the dropped content. Closes #2242; see also #3412.
2017-01-27Shared: rename compactify', compactify'DL -> compactify, compactifyDL.John MacFarlane5-16/+16
2017-01-27Removed Shared.compactify.John MacFarlane1-8/+13
Changed signatures on Parsing.tableWith and Parsing.gridTableWith.
2017-01-25Cleanups for rebase.John MacFarlane1-1/+1
2017-01-25Removed readerVerbosity and writerVerbosity.John MacFarlane2-16/+7
API change. Also added a verbosity parameter to makePDF.
2017-01-25More logging-related changes.John MacFarlane5-100/+93
Class: * Removed getWarnings, withWarningsToStderr * Added report * Added logOutput to PandocMonad * Make logOutput streaming in PandocIO monad * Properly reverse getLog output Readers: * Replaced use of trace with report DEBUG. TWiki Reader: Put everything inside PandocMonad m. API changes.
2017-01-25Changes to verbosity in writer and reader options.John MacFarlane7-10/+10
API changes: Text.Pandoc.Options: * Added Verbosity. * Added writerVerbosity. * Added readerVerbosity. * Removed writerVerbose. * Removed readerTrace. pandoc CLI: The `--trace` option sets verbosity to DEBUG; the `--quiet` option sets it to ERROR, and the `--verbose` option sets it to INFO. The default is WARNING.
2017-01-25Revert "Added page breaks into Pandoc."John MacFarlane2-36/+10
This reverts commit f02a12aff638fa2339192231b8f601bffdfe3e14.
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