summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* Markdown reader: Made implicit header references case-insensitive.John MacFarlane2015-05-13
| | | | | | | | | Added `stateHeaderKeys` to `ParserState`; this is a `KeyTable` like `stateKeys`, but it only gets consulted if we don't find a match in `stateKeys`, and if `Ext_implicit_header_references` is enabled. Closes #1606.
* HTML reader: Support base tag.John MacFarlane2015-05-13
| | | | | | | | | We only support the href attribute, as there's no place for "target" in the Pandoc document model for links. Added HTML reader test module, with tests for this feature. Closes #1751.
* Beamer: mark slide as `[fragile]` if header has `fragile` class.John MacFarlane2015-05-13
| | | | Closes #2119.
* EPUB writer: Properly handle image URLs without an extension.John MacFarlane2015-05-13
| | | | | | | We now look at the mime type from the server and attach an appropriate extension. Closes #1855.
* Fixed regression in charsInBalancedBrackets.John MacFarlane2015-05-13
| | | | | | | | | | | Introduced by e9d7504. This regression caused link and image references containing raw tex not to parse correctly. Added test. Closes #2150.
* Don't use sup element for epub footnotes.John MacFarlane2015-05-11
| | | | | | | | | Instead, just use an a element with class `footnoteRef`. This allows more styling options, and provides better results in some readers (e.g. iBooks, where anything inside the a tag breaks popup footnotes). Closes #1995.
* HTML reader: Fixed detection of self-closing tags.John MacFarlane2015-05-11
| | | | | | | | Earlier versions had a bug and would wrongly think opening tags containing attributes with slashes in them were self-closing. Closes #2146.
* ImageSize: fixed some exif parsing bugs.John MacFarlane2015-05-10
| | | | | Closes #1834. The image originally supplied works fine now with pandoc.
* Improved warnings when image size can't be determined.John MacFarlane2015-05-09
| | | | Closes #1834.
* ImageSize: Use runGetOrFail with binary 0.7+.John MacFarlane2015-05-09
|
* ImageSize: make jpeg header parsing routines return Either.John MacFarlane2015-05-09
| | | | See #1834.
* ImageSize: make imageSize return an Either, not a Maybe.John MacFarlane2015-05-09
| | | | | This will give us better error reporting options. This is part of a fix for #1834.
* Revert "EPUB writer: stylesheet changes. Closes #2040."John MacFarlane2015-05-09
| | | | | | | | | | This reverts commit 1c2951dfd9ee72e5270cb974a06098adb9178f89. See #2040. The semantics was too squishy. `--css` takes a URL, but for EPUB we need files that we can read. I prefer keeping the old system for now, with `--epub-stylesheet`.
* EPUB writer: stylesheet changes. Closes #2040.John MacFarlane2015-05-08
| | | | | | | | | | | | * Allow `--css` to be used to specify stylesheets. * Deprecated `--epub-stylesheet` and made it a synoynym of `--css`. * If a code block with class "css" is given as contents of the `stylesheet` metadata field, use its literal code as contents of the epub stylesheet. Otherwise, treat it as a filename and read the file. * Note: `--css` and `stylesheet` in metadata are not compatible. `stylesheet` takes precedence.
* Deal with deprecation warning in Custom.John MacFarlane2015-05-05
|
* UTF8: Better handling of bare CRs in input files.John MacFarlane2015-05-05
| | | | | | | Previously we just stripped them out; now we convert other line ending styles to LF line endings. Closes #2132.
* SelfContained: properly handle data URIs in css urls.John MacFarlane2015-05-04
| | | | | | Also use a proper css parser (adds dependency on text-css). Closes #2129.
* Make sure a closing `</div>` doesn't get included in a defn list item.John MacFarlane2015-05-03
| | | | Closes #2127.
* LaTeX writer: Add a `\label` in `\hyperdef` for Div, Span.John MacFarlane2015-05-02
| | | | Otherwise links don't work.
* EPUB writer: Use plain writer for metadata dc: fields.John MacFarlane2015-05-01
| | | | | | | This gives better results when we have, e.g. multiple paragraphs. Note that tags aren't allowed in these fields. Closes #2121.
* SelfContained: cssURLs no longer tries to fetch fragment URLs.John MacFarlane2015-05-01
| | | | | The current test is: does the URL start with a `#`? Closes #2121.
* Added woff2 to MIME typesAlfred Wechselberger2015-04-29
|
* HTML reader: Allow multiple colgroups in table.John MacFarlane2015-04-29
| | | | Closes #2122.
* EPUB writer: Remove linear=no from cover itemref.John MacFarlane2015-04-26
| | | | Closes #1609.
* Fixed regression with lists inside defintiion lists.John MacFarlane2015-04-26
| | | | | | | | | | This fixes a regression (not in any released version) on things like hi : - there Closes #2098.
* Merge pull request #2112 from lierdakil/issue2101John MacFarlane2015-04-26
|\ | | | | Custom Writer: Set foreign encoding to UTF-8
| * Custom Writer: Set foreign encoding to UTF-8Nikolay Yakimov2015-04-26
| | | | | | | | | | | | | | Closes #2101, #1634 Also factored out ByteString, since it's only used as an intermediate representation.
* | Updated copyright notices to -2015. Closes #2111.John MacFarlane2015-04-26
|/
* LaTeX reader: recognize `\newpage` as a block command.John MacFarlane2015-04-22
|
* Custom writer: use UTF-8 aware bytestring conversion.John MacFarlane2015-04-21
| | | | This might help with #2101.
* Rewrote charsInBalancedBrackets.John MacFarlane2015-04-19
| | | | | | This version should be a bit more efficient. This doesn't help with #1735, however.
* MD Reader: Fix links/footnotets after citationsNikolay Yakimov2015-04-20
| | | | | | Footnotes: check if '^' follows '[' Links: check if '[' or '(' follows ']' Shorthand links: attempt to lazily parse suffix as referenceLink
* Revert "Merge pull request #1947 from mpickering/Fmonad"John MacFarlane2015-04-18
| | | | | | | | | | | | | Closes #2062. This reverts commit c302bdcdbe97b38721015fe82403b2a8f488a702, reversing changes made to b983adf0d0cbc98d2da1e2751f46ae1f93352be6. Conflicts: src/Text/Pandoc/Parsing.hs src/Text/Pandoc/Readers/Markdown.hs src/Text/Pandoc/Readers/Org.hs src/Text/Pandoc/Readers/RST.hs
* Markdown writer: improved escaping.John MacFarlane2015-04-18
| | | | | | | | `<` should not be escaped as `\<`, for compatibility with original Markdown. We now escape `<` and `>` with entities. Also, we now backslash-escape square brackets. Closes #2086.
* Markdown definition lists: don't require indent for first line.John MacFarlane2015-04-18
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously the body of the definition (after the `:` or `~` marker) needed to be in column 4. This commit relaxes that requirement, to better match the behavior of PHP Markdown Extra. So, now this is a valid definition list: foo : bar This patch also helps resolve a potentially ambiguity with table captions: foo : bar ----- table ----- Is "bar" a definition, or the caption for the table? We'll count it as a caption for the table. Closes #2087.
* More principled fix for #1820.John MacFarlane2015-04-17
| | | | | | | | If the tag parses as a comment, we check to see if the input starts with `<!--`. If not, it's bogus comment mode and we fail htmlTag. Includes test case. Closes #1820.
* Merge branch 'latex-tightlist' of https://github.com/jlduran/pandoc into ↵John MacFarlane2015-04-17
|\ | | | | | | | | | | | | jlduran-latex-tightlist Conflicts: data/templates
| * LaTeX writer: Use a declaration for tight listsJose Luis Duran2014-09-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, pandoc has hard-coded the following in order to make tight lists in LaTeX: ```hs text "\\itemsep1pt\\parskip0pt\\parsep0pt" ``` Which is fine, but does not allow customizations. For example, the `memoir` class already has a `\tightlist` declaration for this purpose: ```tex \newcommand{\tightlist}{% \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} ``` I'm proposing to use a similar solution: ```diff @@ In Writers/LaTeX.hs: -then text "\\itemsep1pt\\parskip0pt\\parsep0pt" +then text "\\tightlist" @@ In templates/default.latex: +\newcommand{\tightlist}{% + \setlength{\itemsep}{1pt}\setlength{\parskip}{0pt}\setlength{\parsep}{0pt}} ``` This allows us to customize the tightness to our needs. Backward Compatibility If a person is using a custom LaTeX template (not based upon the `memoir` class), the `\tightlist` declaration must be added.
* | Merge pull request #1954 from mcmtroffaes/feature/citekey-firstchar-alphanumJohn MacFarlane2015-04-17
|\ \ | | | | | | Allow digit as first character of a citation key.
| * | Allow digit as first character of a citation key.Matthias C. M. Troffaes2015-02-18
| | | | | | | | | | | | | | | | | | | | | | | | * Update parser to recognize citation keys starting with a digit. * Update documentation accordingly. * Test case added. See https://github.com/jgm/pandoc-citeproc/issues/97
* | | Merge pull request #2079 from lierdakil/rst-normalize-headingsJohn MacFarlane2015-04-17
|\ \ \ | | | | | | | | RST Writer: Normalize headings to sequential levels
| * | | RST Writer: treat headings in block quotes, etc as rubricsNikolay Yakimov2015-04-16
| | | |
| * | | RST Writer: Normalize headings to sequential levelsNikolay Yakimov2015-04-13
| | | | | | | | | | | | | | | | This is pretty much required by docutils.
* | | | Merge pull request #2092 from lierdakil/issue1909John MacFarlane2015-04-17
|\ \ \ \ | | | | | | | | | | MD Reader: Smart apostrophe after inline math
| * | | | MD Reader: Smart `'` after inline mathNikolay Yakimov2015-04-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes #1909. Adds new parser combinator to Parsing.hs `a <+?> b` : if a succeeds, applies b and mappends output (if any) to result of a. If b fails, it's just a, if a fails, whole expression fails.
* | | | | Fixed `htmlTag` in HTML reader.John MacFarlane2015-04-17
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | Require that `<!` or `<?` be followed by nonspace. This prevents `</ div>` from being parsed as a comment. Closes #1820.
* / / / Docx Writer: Take TOC title from toc-title metadata fieldNikolay Yakimov2015-04-14
|/ / /
* | | Fixed warning.John MacFarlane2015-04-12
| | |
* | | Fixed toc depth in RST writer.John MacFarlane2015-04-12
| | | | | | | | | | | | | | | | | | Previously the depth was being rendered as a floating point number with a decimal point. Thanks to Nick Yakimov for noticing this.
* | | Merge pull request #2072 from lierdakil/latex-reader-cleanupJohn MacFarlane2015-04-12
|\ \ \ | | | | | | | | LaTeX Reader: Code cleanup