aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/Markdown.hs
AgeCommit message (Collapse)AuthorFilesLines
2018-01-05Update copyright notices to include 2018Albert Krewinkel1-2/+2
2017-12-23Plain writer: don't linkify table of contents.John MacFarlane1-10/+12
2017-11-28Support `--webtex` for `gfm` output.John MacFarlane1-3/+2
2017-11-13Markdown writer: fix bug with doubled footnotes in grid tables.John MacFarlane1-12/+22
Closes #4061.
2017-10-31Markdown reader: make sure fenced div closers work in lists.John MacFarlane1-1/+1
Previously the following failed: ::: {.class} 1. one 2. two ::: and you needed a blank line before the closing `:::`.
2017-10-31Make `fenced_divs` affect the Markdown writer.John MacFarlane1-5/+13
If `fenced_divs` is enabled, fenced divs will be used.
2017-10-27Automatic reformating by stylish-haskell.John MacFarlane1-3/+3
2017-10-13markdown writer: always write bracketed_spans' attributesd-dorazio1-2/+4
2017-09-07Markdown writer: Escape pipe characters when `pipe_tables` enabled.John MacFarlane1-0/+1
Closes #3887.
2017-09-05Markdown writer: make Span with null attribute transparent.John MacFarlane1-4/+3
That is, we don't use brackets or `<span>` tags to mark spans when there are no attributes; we simply output the contents.
2017-09-04Plain writer: don't use &nbsp; to separate list and indented code.John MacFarlane1-3/+6
There's no need for it in this context, since this isn't to be interpreted using Markdown rules.
2017-08-26Markdown writer: don't crash on Str "".John MacFarlane1-1/+1
2017-08-13Markdown writer: Use pipe tables if `raw_html` disabled...John MacFarlane1-2/+10
and `pipe_tables` enabled, even if the table has relative width information. Closes #3734.
2017-07-30Markdown writer: better escaping of `<` and `>`.John MacFarlane1-2/+6
If `all_symbols_escapable` is set, we backslash escape these. Otherwise we use entities as before.
2017-06-30Markdown writer: Ensure that `+` and `-` are escaped properly...John MacFarlane1-0/+3
so they don't cause spurious lists. Previously they were only if succeeded by a space, not if they were at end of line. Closes #3773.
2017-06-26Use `table-of-contents` for contents of toc, make `toc` a boolean.John MacFarlane1-3/+7
Changed markdown, rtf, and HTML-based templates accordingly. This allows you to set `toc: true` in the metadata; this previously produced strange results in some output formats. Closes #2872. For backwards compatibility, `toc` is still set to the toc contents. But it is recommended that you update templates to use `table-of-contents` for the toc contents and `toc` for a boolean flag.
2017-06-23Markdown writer: make sure `plain`, `markdown_github`, etc. work for raw.John MacFarlane1-5/+9
Previously only `markdown` worked. Note: currently a raw block labeled `markdown_github` will be printed for any `markdown` format.
2017-06-20Writers: adjusted for renderTemplate' changes.John MacFarlane1-1/+1
Now we raise a proper error on template failure.
2017-06-17Use Control.Monad.State.Strict throughout.John MacFarlane1-1/+1
This gives 20-30% speedup and reduction of memory usage in most of the writers.
2017-06-12Markdown writer: don't allow soft break in header.John MacFarlane1-0/+7
Closes #3736.
2017-06-11Switched Writer types to use Text.John MacFarlane1-10/+13
* XML.toEntities: changed type to Text -> Text. * Shared.tabFilter -- fixed so it strips out CRs as before. * Modified writers to take Text. * Updated tests, benchmarks, trypandoc. [API change] Closes #3731.
2017-06-01Markdown writer: Avoid inline surround-marking with empty content.John MacFarlane1-0/+5
E.g. we don't want `<strong></strong>` to become `****`. Similarly for emphasis, super/subscript, strikeout. Closes #3715.
2017-05-27Markdown writer: changes to `--reference-links`.John MacFarlane1-15/+44
With `--reference-location` of `section` or `block`, pandoc will now repeat references that have been used in earlier sections. The Markdown reader has also been modified, so that *exactly* repeated references do not generate a warning, only references with the same label but different targets. The idea is that, with references after every block, one might want to repeat references sometimes. Closes #3701.
2017-05-23Shared: Provide custom isURI that rejects unknown schemes [isURI]Albert Krewinkel1-1/+0
We also export the set of known `schemes`. The new function replaces the function of the same name from `Network.URI`, as the latter did not check whether a scheme is well-known. E.g. MediaWiki wikis frequently feature pages with names like `User:John`. These links were interpreted as URIs, thus turning internal links into global links. This is prevented by also checking whether the scheme of a URI is frequently used (i.e. is IANA registered or an otherwise well-known scheme). Fixes: #2713 Update set of well-known URIs from IANA list All official IANA schemes (as of 2017-05-22) are included in the set of known schemes. The four non-official schemes doi, isbn, javascript, and pmid are kept.
2017-05-17Markdown writer: Fixed duplicated reference linksJohn MacFarlane1-11/+15
with `--reference-links` and `--reference-location=section`. Also ensure that there are no empty link references `[]`. Closes #3674.
2017-05-13Update dates in copyright noticesAlbert Krewinkel1-2/+2
This follows the suggestions given by the FSF for GPL licensed software. <https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html>
2017-05-07Markdown writer: missing \n (#3647)David A Roberts1-1/+1
2017-05-03Markdown writer: better escaping for links (#3628)David A Roberts1-1/+10
Previously the Markdown writer would sometimes create links where there were none in the source. This is now avoided by selectively escaping bracket characters when they occur in a place where a link might be created. Closes #3619.
2017-05-03Markdown Writer: put space before reference link definitionsMauro Bieg1-1/+1
Fixes #3630 (#3631). Previously the attributes in link reference definitions did not have a space preceding.
2017-05-02Markdown writer: Case-insensitive reference links. (#3616)David A Roberts1-14/+16
Ensure that we do not generate reference links whose labels differ only by case. Also allow implicit reference links when the link text and label are identical up to case. Closes #3615.
2017-03-24Markdown writer: don't emit a simple table if `simple_tables` disabled.John MacFarlane1-9/+9
Closes #3529.
2017-03-21Plain writer: use _(..) or ^(..) for super/subscript...John MacFarlane1-24/+31
...unless unicode super/subscripted characters are available.
2017-03-21Improve rendering of superscript in plain output.John MacFarlane1-13/+29
We now handle a few non digit characters (+, -, =, parentheses) for which there are superscripted unicode characters. Closes #3518.
2017-03-21Moved more gridTable calculations to Writers.Shared.John MacFarlane1-24/+3
2017-03-21Moved gridTable from Markdown writer to Writers.Shared.John MacFarlane1-41/+0
2017-03-11Markdown writer: fixed bugs in simple/multiline list output.John MacFarlane1-10/+9
* Previously we got overlong lists with `--wrap=none`. This is fixed. * Previously a multiline list could become a simple list (and would always become one with `--wrap=none`). Closes #3384.
2017-03-08Markdown writer: Avoid spurious blanklines at end of document...John MacFarlane1-1/+1
after tables and list, for example.
2017-03-08Markdown writer: ensure space before list at top level.John MacFarlane1-22/+31
Closes #3487.
2017-03-08Markdown writer: escape unordered list markers at beginning of paragraphJohn MacFarlane1-12/+20
to avoid false interpretation as a list. Also handle `|`, and refactor code for escaping `%`. Closes #3497.
2017-03-06Markdown writer: better handling of tables with empty columns.John MacFarlane1-12/+22
E.g. an HTML table with two cells in the first row and one in the second (but no row/colspan). We now calculate the number of columns based on the longest row (or the length of aligns or widths). Closes #3337.
2017-03-06Markdown writer: Fixed false ordered lists in YAML metadata.John MacFarlane1-1/+1
Now we properly escape things that would otherwise start ordered lists, such as --- title: 1. inline ... Closes #3492. Closes #1685.
2017-03-05Markdown writer: escape initial % in a paragraph...John MacFarlane1-1/+5
...if the `pandoc_title_blocks` extension is enabled. Otherwise in a document starting with a literal percent sign the first line is wrongly interpreted as a title. Closes #3454.
2017-03-04Fixed some loose ends in #1592.John MacFarlane1-4/+1
Added test cases. Fixed HTML reader to parse a span with class "smallcaps" as SmallCaps. Fixed Markdown writer to render SmallCaps as a native span when native spans are enabled.
2017-03-04Markdown writer: Use span with class 'smallcaps' for SmallCaps.John MacFarlane1-2/+1
Instead of a style attribute as before. See #1592.
2017-03-04Stylish-haskell automatic formatting changes.John MacFarlane1-57/+60
2017-03-02Removed unnecessary import.John MacFarlane1-1/+0
2017-03-01Markdown writer: Fixed grid tables embedded in grid tables.John MacFarlane1-32/+49
Closes #2834.
2017-03-01Markdown writer: Refactored gridTable to use widths in chars.John MacFarlane1-10/+12
2017-02-25Markdown writer: don't include variables in metadata blocks!John MacFarlane1-4/+3
Previously variables set on the command line were included in e.g. YAML metadata, contrary to documentation and intentions.
2017-02-17Added warnings for non-rendered blocks to some writers.John MacFarlane1-5/+10