aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2015-10-12RST writer: tweaks to header normalization.John MacFarlane1-4/+22
These changes are intended to make the writer more useful to people who are processing small fragments, which may for example look like this: ### third level header from previous section ## second level header Previously such fragments got turned into two headers of the same level. The new algorithm avoids doing any normalization until we hit the minimal-level header in the fragment (here, the second level header). Closes #2394.
2015-10-11Removed unnecessary import.John MacFarlane1-1/+1
2015-10-11Percent-encode more special characters in URLs.John MacFarlane2-7/+10
HTML, LaTeX writers adjusted. The special characters are '<','>','|','"','{','}','[',']','^', '`'. Closes #1640, #2377.
2015-10-11Define Typeable and Exception instances for PandocError.John MacFarlane1-1/+6
Closes #2386.
2015-10-11HTML reader/writer: better handling of "section" elements.John MacFarlane2-5/+15
Previously `<section>` tags were just parsed as raw HTML blocks. With this change, section elements are parsed as Div elements with the class "section". The HTML writer will use `<section>` tags to render these Divs in HTML5; otherwise they will be rendered as `<div class="section">`. Closes #2438.
2015-10-11Native writer: format Div properly, with blocks separated.John MacFarlane1-0/+2
2015-10-10Merge pull request #2412 from frerich/reader/docbook/xref_supportJohn MacFarlane1-5/+37
Added support for <xref> tag in DocBook reader
2015-10-10Merge pull request #2441 from mb21/polyglossia-langJohn MacFarlane1-20/+36
Change variable to polyglossia-lang.name and .options
2015-10-10Re-export pandocVersions from Text.Pandoc.John MacFarlane1-1/+2
The actual definition has been moved to Text.Pandoc.Shared, but to avoid breaking changes we reexport it here.
2015-10-10Merge pull request #2426 from alexvong1995/better-man-writerJohn MacFarlane3-9/+11
Better man writer (revised)
2015-10-09LaTeX reader: don't eat excess whitespace after macros.John MacFarlane1-4/+4
Really close #2446.
2015-10-09LaTeX reader: don't eat whitespace after macro with only opt arg.John MacFarlane1-1/+3
Closes #2446.
2015-10-07Change variable to polyglossia-lang.name and .optionsmb211-20/+36
closes #2437
2015-10-04Docx Reader: Parse soft, no-break hyphen elementsOphir Lifshitz2-1/+7
2015-10-03FIxed typo: Ext_superscript, Ext_subscript.John MacFarlane1-2/+2
2015-10-03For markdown_mmd, add: implicit_figures, superscripts, subscripts.John MacFarlane1-0/+9
See #2401.
2015-10-01Set the template variable $pandoc-version$ to pandocVersion by default.Alex Vong1-0/+1
* src/Text/Pandoc/Writers/Man.hs: Set $pandoc-version$ to be pandocVersion.
2015-10-01Move the variable pandocVersion from `src/Text/Pandoc.hs` toAlex Vong2-9/+9
`src/Text/Pandoc/Shared.hs`, so that all Writers can access this variable without importing `src/Text/Pandoc.hs`, preventing circular import. * pandoc.hs: Import pandocVersion from `Text.Pandoc.Shared`. * src/Text/Pandoc.hs: Remove the definition of pandocVersion and relevant import. * src/Text/Pandoc/Shared.hs: Add the definition of pandocVersion and relevant import.
2015-10-01Set the template variable $hyphenate$ to true by defaultAlex Vong1-0/+1
* src/Text/Pandoc/Writers/Man.hs: Set $hyphenate$ to be true.
2015-09-26Removed unneeded imports.John MacFarlane2-3/+2
2015-09-26MediaBag: ensure that / is always used as path separator.John MacFarlane2-7/+10
2015-09-26Merge pull request #2419 from mb21/bidiJohn MacFarlane2-13/+40
Support bidirectional text output with XeLaTeX, ConTeXt and HTML
2015-09-26Support bidirectional text output with XeLaTeX, ConTeXt and HTMLmb212-13/+40
closes #2191
2015-09-26Removed unneeded import.John MacFarlane1-1/+0
2015-09-25Correctly recognize book documentclass in metadata.John MacFarlane1-1/+1
Closes #2395.
2015-09-25Markdown reader: handle 'id' and 'class' in parsing key/value attrs.John MacFarlane1-1/+5
# Header {id="myid" class="foo bar"} is now equivalent to # Header {#myid .foo .bar} Closes #2396.
2015-09-24Improve text generated for <xref> by employing docbook-xsl heuristicsFrerich Raabe1-2/+16
docbook-xsl, a set of XSLT scripts to generate HMTL out of DocBook, tries harder to generate a nice xref text. Depending on the element being linked to, it looks at the title or other descriptive child elements. Let's do that, too.
2015-09-24Added proper support for DocBook 'xref' elementsFrerich Raabe1-2/+18
'xref' is used to create cross references to other parts of the document. It is an empty element - the cross reference text depends on various attributes. Quoting 'DocBook: The Definitive Guide': 1. If the endterm attribute is specified on xref, the content of the element pointed to by endterm will be used as the text of the cross-reference. 2. Otherwise, if the object pointed to has a specified XRefLabel, the content of that attribute will be used as the cross-reference text.
2015-09-23Pass the parsed DocBook content along the state of readDocBookFrerich Raabe1-2/+4
Having access to the entire document will be needed when handling elements which refer to other elements. This is needed for e.g. <xref> or <link>, both of which reference other elements (by the 'id' attribute) for the label text. I suppose that in practice, the [Content] returned by parseXML always only contains one 'Elem' value -- the document element. However, I'm not totally sure about it, so let's just pass all the Content along.
2015-09-23Minor refactoring to readDocBookFrerich Raabe1-2/+2
I plan to use the parsed and normalized XML tree read in readDocBook in other places - prepare that commit by factoring this code out into a separate, shared, definition.
2015-09-23LaTeX reader: support longtable.John MacFarlane1-0/+2
Closes #2411.
2015-09-22Merge pull request #2369 from mb21/language-variablesJohn MacFarlane2-12/+176
`lang` variable is now in BCP47 format
2015-09-20Merge pull request #2406 from tarleb/org-verse-fixJohn MacFarlane1-1/+1
Make sure verse blocks can contain empty lines
2015-09-19Make sure verse blocks can contain empty linesAlbert Krewinkel1-1/+1
The previous verse parsing code made the faulty assumption that empty strings are valid (and empty) inlines. This isn't the case, so lines are changed to contain at least a newline. It would generally be nicer and faster to keep the newlines while splitting the string. However, this would require more code, which seems unjustified for a simple (and fairly rare) block as *verse*. This fixes #2402.
2015-09-19[RST Writer] Don't normalize heading levels below input minimumNikolay Yakimov1-1/+7
2015-09-17Markdown writer: in TOC, add links to headers.John MacFarlane1-2/+5
Closes #829.
2015-09-09Use user data directory for reference docx archive.John MacFarlane1-1/+1
This allows the test suite to work without installing pandoc first. It also brings the docx writer in line with the odt writer.
2015-08-20`lang` variable is now in BCP47 formatmb212-12/+176
strings are converted for LaTeX and ConTeXt output, closes #1614
2015-08-17Merge pull request #2364 from gbataille/bugDocJohn MacFarlane1-6/+6
[BUG] Haddock : * and ^ to be escaped in docs
2015-08-17[BUG] Haddock : * and ^ to be escaped in docsGrégory Bataille1-6/+6
2015-08-15RST reader: better handling of indirect roles.John MacFarlane1-9/+11
Previously the parser failed on this kind of case .. role:: indirect(code) .. role:: py(indirect) :language: python :py:`hi` Now it currectly recognizes `:py:` as a code role. The previous test for this didn't work, because the name of the indirect role was the same as the language defined its parent, os it didn't really test for this behavior. Updated test.
2015-08-15Merge pull request #2360 from jg/issue-2354John MacFarlane2-2/+18
Org reader: add auto identifiers if not present on headers
2015-08-15Org reader: add auto identifiers if not present on headersJuliusz Gonera2-2/+18
Refs #2354 This should also fix the table of contents (--toc) when generating a html file from org input
2015-08-13RST writer: ensure that `\ ` is inserted when needed...John MacFarlane1-0/+2
...before Cite and Span elements that begin with a "complex" element. Closes jgm/pandoc-citeproc#157.
2015-08-12RST writer: Don't insert `\ ` when complex expression in matched pairs.John MacFarlane1-3/+4
E.g. `` [:sup:`3`] `` is okay; you don't need `` [:sup:`3`\ ] ``.
2015-08-10EPUB TOC: replace literal "<br/>" with space.John MacFarlane1-0/+1
Closes #2105.
2015-08-10EPUB reader: stop mangling external URLs.John MacFarlane1-8/+1
Closes #2284. Note the changes to the test suite. In each case, a mangled external link has been fixed, so these are all positive.
2015-08-10Docx writer: Moved invalid character stripping to `formattedString`.John MacFarlane1-4/+4
This avoids an inefficient generic traversal. Updates f3aa03e. Closes #2356.
2015-08-08Text.Pandoc: disable auto_identifiers for epub.John MacFarlane1-2/+1
The epub writer inserts its own auto identifiers; this is more complex due to splitting into "chapter" files.
2015-08-08MediaWiki reader: handle unquoted table attributes.John MacFarlane1-2/+2
Closes #2355.