aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2017-02-15Fix indirect hyperlink targets. Closes #512.John MacFarlane1-23/+33
2017-02-15Add CircularReference constructor to LogMessage.John MacFarlane1-0/+10
2017-02-15ZimWiki writer: removed internal formatting from note and table cells, ↵Alex Ivkin1-24/+54
because ZimWiki does not support it (#3446)
2017-02-14LaTeX reader: include contents of `\parbox`.John MacFarlane1-0/+1
2017-02-14Simplify toRomanNumeral using guards (#3445)Alexander Krotov1-18/+16
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-12Do not strip # from Org anchor linksAlexander Krotov1-1/+1
Links with # are perfectly valid according to http://orgmode.org/manual/Internal-links.html#Internal-links
2017-02-11Rename logMessagesToJSON -> encodeLogMessages.John MacFarlane2-5/+4
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 MacFarlane2-5/+6
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-11Logging: export logMessagesToJSON.John MacFarlane2-2/+12
Use a deterministic order for fields.
2017-02-11Added --log option to save log messages in JSON format to a file.John MacFarlane1-0/+12
See #3392.
2017-02-11Class.report: Save all log messages in state.John MacFarlane1-2/+2
Verbosity level only affects which are printed to stdout. (Exception: DEBUG messages are only printed, never saved to state.)
2017-02-11HTML writer: report when not rendering raw inline/block.John MacFarlane1-3/+8
2017-02-11Use new warnings throughout the code base.John MacFarlane20-175/+202
2017-02-10Logging: added ToJSON instance and showLogMessage.John MacFarlane1-3/+96
This gives us the possibility of both machine-readable and human-readable output for log messages. See #3392.
2017-02-10Added Text.Pandoc.Logging (exported module).John MacFarlane12-19/+94
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 MacFarlane2-5/+11
See #3392.
2017-02-09Reverted deferred media bag code.John MacFarlane1-51/+6
This was not actually being used. Since it adds considerable complexity, it's best not to include it unless we are actually going to use it. The original thought was that we could do all loading in the readers, always deferred and thus costless. This was supposed to eliminate the need to traverse trees loading resources in the docx, epub, odt writers and in PDF and SelfContained. (It would also have the side effect that --extract-media could be used with all input formats. This wasn't an intended side effect, and it could be debated whether it's desirable, since --extract-media was originally designed to extract the media contained in a docx or odt or epub container.) However, we never actually took the step of moving all of this work to the readers, for a couple of reasons. The main reason is that we'd still need to fetch resources in the docx, epub, odt, pdf and self-contained writers, since the Pandoc AST might have been built programatically and hence not generated by a reader. So it's not clear that doing lazy loading in the readers would have any real advantage. I'm still not completely sure about this --- if we change our minds it would be easy to undo this commit. @jkr comments welcome.
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 MacFarlane4-37/+33
* Export readFileFromDirs from Class. * Export insertIncludedFile from Parsing. Simplified code in LaTeX/RST readers.
2017-02-07Moved readFileFromDirs to Text.Pandoc.Class.John MacFarlane3-32/+22
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 MacFarlane9-47/+38
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-06Fix importJohn MacFarlane1-1/+1
2017-02-06Changed year on copyright message.John MacFarlane1-1/+1
2017-02-06Consolidated file arguments into Opt.John MacFarlane1-4/+7
2017-02-06Further refactoring of App.John MacFarlane1-8/+724
Moved option parsing code into App. pandoc.hs is now a 2-liner.
2017-02-05Fix an unneeded import warning.John MacFarlane1-1/+1
2017-02-05Handle language in inline code with --listings.John MacFarlane1-4/+9
Closes #3422.
2017-02-05Split pandoc.hs into a module, Text.Pandoc.App, and a small program.John MacFarlane2-1/+733
The App module provides a function that does a pandoc conversion, based on option settings. The program (pandoc.hs) now does nothing more than parse options and pass them to this function, which can easily be used by other applications (e.g. a GUI wrapper). The Opt structure has been further simplified. API changes: * New exposed module Text.Pandoc.App * Text.Pandoc.Highlighting has been exposed. * highlightingStyles has been moved to Text.Pandoc.Highlighting.
2017-02-05Removed redundant import.John MacFarlane1-1/+0
2017-02-05Allow user to specify User-Agent (#3421)Thenaesh Elango1-3/+11
This commit enables users to specify the User-Agent header used when pandoc requests a document from a URL. This is done by setting an environment variable. For instance, one can do: USER_AGENT="..." ./pandoc -f html -t markdown http://example.com Signed-off-by: Thenaesh Elango <thenaeshelango@gmail.com>
2017-02-04Changed writerEpubMetadata to a Maybe String.John MacFarlane2-3/+3
API change.
2017-02-04Improved escaping in RST writer with smart option.John MacFarlane1-6/+20
2017-02-04Org writer: reduce to two spaces after bulletsAlbert Krewinkel1-2/+2
The org writer was inserting two spaces after list bullets. Emacs Org-mode defaults to a single space, so behavior is changed to reflect this. Closes: #3417
2017-02-04Markdown writer: Better escaping when +smart.John MacFarlane1-17/+21
2017-02-04Expose setVerbosity in Text.PandocJohn MacFarlane1-0/+1
2017-02-04Implemented +/-smart in rst writer.John MacFarlane3-15/+29
Moved unsmartify to Writers.Shared.
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-02-03HTML and DocBook writers: fix internal links with writerIdentifierPrefix opt ↵Mauro Bieg2-4/+6
(#3398) closes #3397
2017-02-02Org.hs: remove misleading commentAlexander Krotov1-1/+0
This comment is likely copied from RST.hs where 'refs' variable indeed exists, but makes no sense here.