summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/Markdown.hs
Commit message (Collapse)AuthorAge
* Markdown writer: in TOC, add links to headers.John MacFarlane2015-09-17
| | | | Closes #829.
* Removed unused import.John MacFarlane2015-06-27
|
* Plain writer: don't use symbols for super/subscript.John MacFarlane2015-06-27
| | | | | | Simplified code by using plainExtensions from Options. Closes #2237.
* Updated copyright notices to -2015. Closes #2111.John MacFarlane2015-04-26
|
* 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 writer: fixes for GHC 7.10.John MacFarlane2015-03-19
|
* Merge pull request #1989 from zudov/shortcut_ref_link_prJohn MacFarlane2015-03-15
|\ | | | | Support shortcut reference links in markdown writer
| * Support shortcut reference links in markdown writerKonstantin Zudov2015-03-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue #1977 Most markdown processors support the [shortcut format] for reference links. Pandoc's markdown reader parsed this shortcuts unoptionally. Pandoc's markdown writer (with --reference-links option) never shortcutted links. This commit adds an extension `shortcut_reference_links`. The extension is enabled by default for those markdown flavors that support reading shortcut reference links, namely: - pandoc - strict pandoc - github flavoured - PHPmarkdown If extension is enabled, reader parses the shortcuts in the same way as it preveously did. Otherwise it would parse them as normal text. If extension is enabled, writer outputs shortcut reference links unless doing so would cause problems (see test cases in `tests/Tests/Writers/Markdown.hs`).
* | Fixed pipe tables -- headerless tables are not allowed.John MacFarlane2015-03-07
|/ | | | | | | | | | | | | GFM and PHP Markdown Extra pipe tables require headers. Previously pandoc allowed pipe tables not to include headers, and produced headerless pipe tables in Markdown output, but this was based on a misconception about pipe table syntax. This commit fixes this. Note: If you have been using headerless pipe tables, this may cause existing tables to break. Closes #1996.
* Markdown writer: don't emit span tags if plain or raw HTML disabled.John MacFarlane2015-02-25
|
* Define isRight since it's only in recent versions of Data.Either.John MacFarlane2015-02-25
|
* Markdown writer: Avoid introducing spurious list items through wrapping.John MacFarlane2015-02-25
| | | | Closes #1946.
* ghc 7.10.1 RC1 requires specifying the type of String literals ↵Mark Wright2015-01-05
| | | | https://ghc.haskell.org/trac/ghc/wiki/Migration/7.10#GHCsaysNoinstanceforFoldable...arisingfromtheuseof...
* Markdown writer: don't escape $, ^, ~ when extensions are deactivated.John MacFarlane2014-08-16
| | | | | | | `tex_math_dollars`, `superscript`, and `subscript` extensions, respectively. Closes #1127.
* Plain writer: Use ALL CAPS for level 1 headers.John MacFarlane2014-08-08
|
* Markdown writer: Respect -raw_html.John MacFarlane2014-08-08
| | | | | | | pandoc -t markdown-raw_html should not emit any raw HTML, even span and div tags that go with pandoc Span and Div elements. Cleaned up a bit of the logic with extensions and plain.
* Use `stripPrefix` where appropriate.Artyom Kazak2014-08-04
|
* Correctly implement capitalisation.Artyom Kazak2014-08-03
| | | | | | | | Using `map toUpper` to capitalise text is wrong, as e.g. “Straße” should be converted to “STRASSE”, which is 1 character longer. This commit adds a `capitalize` function and replaces 2 identical implementations in different modules (`toCaps` and `capitalize`) with it.
* Markdown writer: Separate adjacent lists of the same kind with comment.John MacFarlane2014-07-27
| | | | Closes #1458.
* Markdown writer: More improvements to 'plain' output, updated tests.John MacFarlane2014-07-27
| | | | | | | | | Math now appears in unicode if possible, without the distracting italics around identifiers. Blank lines around headers are more consistent. Footnotes appear in regular [n] style.
* Markdown writer: Better 'plain' output.John MacFarlane2014-07-27
| | | | | | | | | | | We now largely follow the style of Project Gutenberg. Emphasis is rendered with `_underscores_`, strong with ALL CAPS. The appearance of horizontal rules has changed (even in regular markdown) to a line across the whole page. Headings are rendered differently, using space to set them off.
* Markdown writer: Update definition lists.John MacFarlane2014-07-27
| | | | | They now behave like the new reader does. The old behavior can be activated with the `compact_definition_lists` extension.
* Markdown writer: Avoid wrapping that might start a list.John MacFarlane2014-07-21
| | | | Or a blockquote or header. Closes #1013.
* Renamed readTeXMath' to avoid name conflict with texmath 0.6.7Matthew Pickering2014-07-19
| | | | Also removed deprecated readTeXMath.
* Markdown writer: Use span with style for SmallCaps. (#1360)John MacFarlane2014-07-13
|
* Markdown writer: use Span instead of (hackish) SmallCaps in plainify.John MacFarlane2014-07-13
|
* Use renderTags' for all tag rendering.John MacFarlane2014-07-13
| | | | | | This properly handles tags that should be self-closing. Previously `<hr/>` would appear in EPUB output as `<hr></hr>`. Closes #1420.
* Markdown writer: don't use braced attributes for fenced code.John MacFarlane2014-07-11
| | | | | | | | | | Removed `Ext_fenced_code_attributes` from `markdown_github` extensions. If this extension is not set, the first class attribute will be printed after the opening fence as a bare word. Closes #1416.
* Markdown writer: Prettier pipe tables.John MacFarlane2014-06-03
| | | | Columns are now aligned. Closes #1323.
* Update copyright notices for 2014, add missing noticesAlbert Krewinkel2014-05-09
|
* Markdown writer: Use proper escapes to avoid unwanted lists.John MacFarlane2014-04-24
| | | | | | Previously we used 0-width spaces, an ugly hack. Closes #980.
* Markdown writer: Use longer backtick fences if needed.John MacFarlane2014-03-30
| | | | | | | | | | | If the content contains a backtick fence and there are attributes, make sure longer fences are used to delimit the code. Note: This works well in pandoc, but github markdown is more limited, and will interpret the first string of three or more backticks as ending the code block. Closes #1206.
* HLint: use `elem` and `notElem`Henry de Valence2013-12-19
| | | | Replaces long conditional chains with calls to `elem` and `notElem`.
* Don't use tilde code blocks with braced attributes in gfm output.John MacFarlane2013-12-09
| | | | | | | | A consequence of this change is that the backtick form will be preferred in general if both are enabled. I think that is good, as it is much more widespread than the tilde form. Closes #1084.
* Markdown writer: Fix rendering of tight sublists.John MacFarlane2013-11-30
| | | | | | | | | | | E.g. - foo - bar - baz Previously a spurious blank line was included before the last item. Closes #1050.
* Don't print `<span>` tags in 'plain' output.John MacFarlane2013-11-06
|
* TexMath: Export readTeXMath', which attends to display/inline.John MacFarlane2013-11-01
| | | | | Deprecate readTeXMath, and use readTeXMath' in all the writers. Require texmath >= 0.6.5.
* Use isURI instead of isAbsoluteURI.John MacFarlane2013-10-16
| | | | It allows fragments identifiers.
* Markdown reader: small code improvement.John MacFarlane2013-09-19
|
* Markdown writer: Print references if output is 'plain'.John MacFarlane2013-09-12
|
* Markdown writer: Fixed bugs in YAML header output.John MacFarlane2013-09-06
|
* Create Cite element even if no matching reference in the biblio.John MacFarlane2013-08-20
| | | | | | | | | | | | | * Add ??? as fallback text for non-resolved citations. * Biblio: Put references (including a header at the end of the document, if one exists) inside a Div with class "references". This gives some control over styling of references, and allows scripts to manipulate them. * Markdown writer: Print markdown citation codes, and disable printing of references, if `citations` extension is enabled. NOTE: It would be good to improve what citeproc-hs does for a nonexistent key.
* Adjusted writers and tests for change in parsing of div/span.John MacFarlane2013-08-18
| | | | | Textile, MediaWiki, Markdown, Org, RST will emit raw HTML div tags for divs. Otherwise Div and Span are "transparent" block containers.
* Use walk, walkM in place of bottomUp, bottomUpM when possible.John MacFarlane2013-08-10
| | | | They are significantly faster.
* Preliminary support for new Div and Span elements in writers.John MacFarlane2013-08-08
| | | | | Currently these are "transparent" containers, except in HTML, where they produce div and span elements with attributes.
* Rename `Ext_yaml_title_block` -> `Ext_yaml_metadata_block`.John MacFarlane2013-07-02
|
* Markdown writer: Changed condition for rendering title block.John MacFarlane2013-07-02
| | | | | Previously it was only rendered if title, author, or date set. Now any metadata field can be set.
* Write full metadata in MMD style title blocks.John MacFarlane2013-07-02
|
* Markdown writer: Commas are okay in plain yaml scalars.John MacFarlane2013-07-01
| | | | It's just commas with brackets that can cause problems.
* Markdown writer: Render yaml title block fields in alpha order.John MacFarlane2013-07-01
| | | | | This makes the output predictable; previously it varied across implementations.