summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
Commit message (Collapse)AuthorAge
* Merge pull request #3033 from tarleb/github-readmeJohn MacFarlane2016-07-22
|\ | | | | PoC: GitHub-optimized README
| * Rename README to MANUAL.txtAlbert Krewinkel2016-07-20
| |
* | Textile reader: disallow empty URL in explicit link.John MacFarlane2016-07-22
| | | | | | | | Closes #3036.
* | Textile reader: support `bc..` extended code blocks.John MacFarlane2016-07-22
| | | | | | | | | | Also, remove trailing newline in code blocks (consistently with Markdown reader).
* | LaTeX reader: be more forgiving of non-standard characters.John MacFarlane2016-07-20
| | | | | | | | | | | | E.g. `^` outside of math. Some custom environments give these a meaning, so we should try not to fall over when we encounter them.
* | LaTeX reader: more robust parsing of unknown environments.John MacFarlane2016-07-20
| | | | | | | | | | We no longer fail on things like `^` inside options for tikz. Closes #3026.
* | RST reader: use Div for admonitions.John MacFarlane2016-07-20
|/ | | | | | | | | | | | | | Previously blockquotes were used. Now a Div is used with class `admonition` and (if relevant) one of the following: `attention`, `caution`, `danger`, `error`, `hint`, `important`, `note`, `tip`, `warning`. `sidebar` is also put into a Div. Note: This will change rendering of RST documents! It should provide much more flexibility. Closes #3031.
* Textile reader: improve definition list parsing.John MacFarlane2016-07-19
| | | | | - Allow multiple terms (which we concatenate with linebreaks). - Fix exponential parsing bug (closes #3020 for real this time).
* Textile reader: improved table parsing.John MacFarlane2016-07-18
| | | | | | | | | | | We now handle cell and row attributes, mostly by skipping them. However, alignments are now handled properly. Since in pandoc alignment is per-column, not per-cell, we try to devine column alignments from cell alignments. Table captions are also now parsed, and textile indicators for thead and tfoot no longer cause parse failure. (However, a row designated as tfoot will just be a regular row in pandoc.)
* Don't require haddock-library 1.4.John MacFarlane2016-07-15
| | | | Instead use CPP to work around version differences.
* Use liftM since otherwise Functor type constraint needen in ghc 7.8.John MacFarlane2016-07-15
|
* Fixed compiler warnings.John MacFarlane2016-07-14
|
* Haddock reader - support math.John MacFarlane2016-07-14
| | | | | The Haddock document model added elements for math in 1.4.
* Docx Writer: Use actual creation time as doc propJesse Rosenthal2016-07-14
| | | | | | | | Previously, we had used the user-supplied date, if available, for Word's document creation metadata. This could lead to weird results, as in cases where the user post-dates a document (so the modification might be prior to the creation). Here we use the actual computer time to set the document creation.
* Shared: improve year sanity check in normalizeDateJesse Rosenthal2016-07-14
| | | | | | | | Previously we parsed a list of dates, took the first one, and then tested its year range. That meant that if the first one failed, we returned nothing, regardless of what the others did. Now we test for sanity before running `msum` over the list of Maybe values. Anything failing the test will be Nothing, so will not be a candidate.
* Shared: normalizeDate should reject illegal years.Jesse Rosenthal2016-07-14
| | | | | | | We only allow years between 1601 and 9999, inclusive. The ISO 8601 actually says that years are supposed to start with 1583, but MS Word only allows 1601-9999. This should stop corrupted word files if the date is out of that range, or is parsed incorrectly.
* Shared: Add further formats for `normalizeDate`Jesse Rosenthal2016-07-14
| | | | | | We want to avoid illegal dates -- in particular years with greater than four digits. We attempt to parse series of digits first as `%Y%m%d`, then `%Y%m`, and finally `%Y`.
* Removed some redundant class constraints.John MacFarlane2016-07-14
|
* Merge pull request #3019 from tarleb/org-verbatim-fixJohn MacFarlane2016-07-14
|\ | | | | Org reader: fix parsing of verbatim inlines
| * Org reader: fix parsing of verbatim inlinesAlbert Krewinkel2016-07-14
| | | | | | | | | | | | | | | | | | | | Org rules for allowed characters before or after markup chars were not checked for verbatim text. This resultet in wrong parsing outcomes of if the verbatim text contained e.g. space enclosed markup characters as part of the text (`=is_substr = True=`). Forcing the parser to update the positions of allowed/forbidden markup border characters fixes this. This fixes #3016.
* | Fixed exponential parsing bug in textile reader.John MacFarlane2016-07-14
|/ | | | Closes #3020.
* Merge pull request #3014 from tarleb/org-writer-divJohn MacFarlane2016-07-05
|\ | | | | Org writer: improve Div handling
| * Org writer: improve Div handlingAlbert Krewinkel2016-07-05
| | | | | | | | | | | | | | | | | | | | | | | | | | Div blocks handling is changed to make the output look more like idiomatic org mode: - Div-wrapped content is output as-is if the div's attribute is the null attribute. - Div containers with an id but neither classes nor key-value pairs are unwrapped and the id is added as an anchor. - Divs with classes associated with greater block elements are wrapped in a `#+BEGIN`...`#+END` block. - The old behavior for Divs with more complex attributes is kept.
* | Org reader: replace ugly code with view patternAlbert Krewinkel2016-07-04
|/ | | | | | | Some less-than-smart code required a pragma switching of overlapping pattern warnings in order to compile seamlessly. Using view patterns makes the code easier to read and also doesn't require overlapping pattern checks to be disabled.
* Merge pull request #3010 from tarleb/org-header-treeJohn MacFarlane2016-07-03
|\ | | | | Org reader: support archived trees, headline levels export setting
| * Org reader: support headline levels export settingAlbert Krewinkel2016-07-03
| | | | | | | | | | The depths of headlines can be modified using the `H` option. Deeper headlines will be converted to lists.
| * Org reader: put export setting parser into moduleAlbert Krewinkel2016-07-02
| | | | | | | | | | Export option parsing is distinct enough from general block parsing to justify putting it into a separate module.
| * Org reader: support archived trees export optionsAlbert Krewinkel2016-07-01
| | | | | | | | | | | | | | Handling of archived trees can be modified using the `arch` option. Archived trees are either dropped, exported completely, or collapsed to include just the header when the `arch` option is nil, non-nil, or `headline`, respectively.
| * Org reader: refactor comment tree handlingAlbert Krewinkel2016-07-01
| | | | | | | | | | | | Comment trees were handled after parsing, as pattern matching on lists is easier than matching on sequences. The new method of reading documents as trees allows for more elegant subtree removal.
| * Org reader: parse as headlines, convert to blocksAlbert Krewinkel2016-07-01
| | | | | | | | | | | | | | Emacs org-mode is based on outline-mode, which treats documents as trees with headlines are nodes. The reader is refactored to parse into a similar tree structure. This simplifies transformations acting on document (sub-)trees.
| * Org reader: improve tag and properties type safetyAlbert Krewinkel2016-07-01
| | | | | | | | | | Specific newtype definitions are used to replace stringly typing of tags and properties. Type safety is increased while readability is improved.
* | Odt reader: Removed redundant Monoid constraints.John MacFarlane2016-07-03
| |
* | Fix warning for parseURl import.John MacFarlane2016-07-03
| |
* | CPP workaround for deprecation of parseUrl in http-client.John MacFarlane2016-07-03
| |
* | Allow 'standout' as a beamer frame option.John MacFarlane2016-07-03
| | | | | | | | | | | | ## Slide title {.standout} Closes #3007.
* | LaTeX reader: strip off double quotes around image source if present.John MacFarlane2016-07-01
| | | | | | | | | | Avoids interpreting these as part of the literal filename. See #2825.
* | LaTeX writer: don't URI-escape image source.John MacFarlane2016-07-01
| | | | | | | | | | Usually this is a local file, and replacing spaces with `%20` ruins things. Closes #2825.
* | ZimWiki writer: removed commented out code that confused Haddock.John MacFarlane2016-07-01
|/ | | | See https://travis-ci.org/jgm/pandoc/jobs/141542247
* Added Zim Wiki writer, template and tests.Alex Ivkin2016-06-30
|
* Docx writer: set paragraph to FirstPara after display mathJesse Rosenthal2016-07-01
| | | | | | | We treat display math like block quotes, and apply FirstParagraph style to paragraphs that follow them. These can be styled as the user wishes. (But, when the user is using indentation, this allows for paragraphs to continue after display math without indentation.)
* Writers: treat SoftBreak as space for strippingJesse Rosenthal2016-07-01
| | | | | | In Writers.Shared, we strip leading and trailing spaces for display math. Since SoftBreak's are treated as spaces, we should strip those too.
* LaTeX reader: fixed `\cite` so it is a NormalCitation not AuthorInText.John MacFarlane2016-06-29
|
* Merge pull request #3001 from tarleb/org-figure-labelJohn MacFarlane2016-06-26
|\ | | | | Org reader: support figure labels
| * Org reader: support figure labelsAlbert Krewinkel2016-06-26
| | | | | | | | | | | | | | | | Figure labels given as `#+LABEL: thelabel` are used as the ID of the respective image. This allows e.g. the LaTeX to add proper `\label` markup. This fixes half of #2496 and #2999.
* | Textile reader: Fix overly aggressive interpretation as images.John MacFarlane2016-06-25
| | | | | | | | | | | | Spaces are not allowed in the image URL in textile. Closes #2998.
* | Fixed RST links with no explicit link text.John MacFarlane2016-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The link `<foo>`_ should have `foo` as both its link text and its URL. See RST spec at <http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#embedded-uris-and-aliases> "The reference text may also be omitted, in which case the URI will be duplicated for use as the reference text. This is useful for relative URIs where the address or file name is also the desired reference text: See `<a_named_relative_link>`_ or `<an_anonymous_relative_link>`__ for details." Closes Debian #828167 -- reported by Christian Heller.
* | Make --webtex work with the Markdown writer.John MacFarlane2016-06-24
|/ | | | | Closes #1177. This is a convenient option for people using websites whose Markdown flavors don't provide for math.
* Textile reader: fixed attributes.John MacFarlane2016-06-23
| | | | | | | | | | | | | | Attributes can't be followed by a space. So, _(class)emph_ but _(noclass) emph_ Closes #2984.
* Markdown writer: use raw HTML for simple, pipe tables with linebreaks.John MacFarlane2016-06-23
| | | | | | | Markdown line breaks involve a newline, and simple and pipe tables can't contain one. Closes #2993.
* Docx reader: Add warning for advanced comment formatting.Jesse Rosenthal2016-06-23
| | | | | | We can't guarantee we'll convert every comment correctly, though we'll do the best we can. This warns if the comment includes something other than Para or Plain.