aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/Markdown.hs
AgeCommit message (Collapse)AuthorFilesLines
2014-05-04Fixed the fix to #1154.John MacFarlane1-1/+1
We need to strip off up to 4 spaces, not up to 3.
2014-05-04Markdown reader: Fixed bug with unwanted code in lists.John MacFarlane1-0/+1
Closes #1154. When reading a raw list item, we now strip off nonindent spaces.
2014-05-02Fixed empty reference links. Closes #1186.John MacFarlane1-3/+1
Includes test.
2014-05-01Markdown reader: Make one-column pipe tables work.John MacFarlane1-6/+16
Closes #1218.
2014-04-24Render numbers in YAML metadata without decimals when possible.John MacFarlane1-1/+6
The change to aeson > 0.7 caused numbers to be rendered with decimals. This change causes them to be rendered without decimals wehn possible.
2014-04-19Move `compactify'DL` from Markdown reader into SharedAlbert Krewinkel1-17/+0
The function `compactify'DL`, used to change the final definition item of a definition list into a `Plain` iff all other items are `Plain`s as well, is useful in many parsers and hence moved into Text.Pandoc.Shared.
2014-04-01Changed the smart punctuation parser to return Inlines rather than an Inline ↵Matthew Pickering1-1/+1
element and updated files accordingly
2014-03-24Markdown reader: Fixed regression on line breaks in strict mode.John MacFarlane1-1/+1
Closes #1203.
2014-02-26Markdown reader: Improved parsing of nested divs.John MacFarlane1-0/+2
Formerly a closing div tag would be missed if it came right after other block-level tags.
2014-02-26Markdown parser: avoid backtracking when closing `</div>` not found.John MacFarlane1-6/+13
2014-02-26Markdown reader: small efficiency improvement.John MacFarlane1-1/+1
Switched `notFollewdBy' rawHtmlBlocks` -> `notFollowedBy' (htmlTag isBlockTag)`, which is more efficient.
2014-02-25Added readerTrace to ReaderOptions, --trace command line opt.John MacFarlane1-1/+11
This is to debug backtracking-related parsing bugs. So far it is only implemented for markdown, but it would be good to extend it to latex and html readers.
2014-02-21Fixed bug in reference link parsing in markdown_mmd.John MacFarlane1-1/+1
The bug was triggered by: Link to [Google][]. Link to [twitter][]. [Google]: http://google.com [twitter]: http://twitter.com
2014-02-04Slight code reorganization in endline.John MacFarlane1-5/+3
2014-01-09Markdown parser: be more permissive about citation keys.John MacFarlane1-3/+4
Keys may now start with an underscore as well as a letter. Underscores do not count as internal punctuation, but are treated like alphanumerics, so "key:_2008" will work, as it did not before. (This change was necessary to use keys generated by zotero.) Closes #1111, closes #1011.
2014-01-07Markdown reader: Allow hard line breaks in table cells.John MacFarlane1-3/+3
The \-newline form must be used; the two-space+newline form won't work, since in a table cell nearly every line ends with two spaces.
2013-12-19HLint: use fromMaybeHenry de Valence1-2/+2
Replace uses of `maybe x id` with `fromMaybe x`.
2013-12-19HLint: redundant parensHenry de Valence1-1/+1
Remove parens enclosing a single element.
2013-12-19HLint: use `elem` and `notElem`Henry de Valence1-4/+4
Replaces long conditional chains with calls to `elem` and `notElem`.
2013-12-15Properly handle script blocks in strict mode.John MacFarlane1-1/+3
(That is, markdown-markdown_in_html_blocks.) Previously a spurious `<p>` tag was being added. Closes #1093.
2013-12-12Markdown reader: Fixed regression in title blocks.John MacFarlane1-4/+4
If author field was empty, date was being ignored. Closes #1089.
2013-12-07Another small performance improvement.John MacFarlane1-3/+5
2013-12-07Small performance improvement in list parsing.John MacFarlane1-2/+3
2013-12-07Markdown reader: Fixed bug with literal `</div>` in lists.John MacFarlane1-3/+4
Closes #1078.
2013-12-06HTML reader: Parse LaTeX math if appropriate options are set.John MacFarlane1-33/+0
* Moved inlineMath, displayMath from Markdown reader to Parsing. * Export them from Parsing. (API change.) * Generalize their types.
2013-12-04Stop parsing "list lines" when we hit a block tag.John MacFarlane1-1/+3
This fixes exponential slowdown in certain input, e.g. a series of lists followed by `</div>`.
2013-11-22Fixed bug with intraword emphasis.John MacFarlane1-1/+2
Closes #1066.
2013-11-03Markdown reader: Correctly handle empty bullet list items.John MacFarlane1-4/+5
For example: - one - - two This should NOT be parsed as a setext header followed by a list.
2013-10-29Markdown reader: Yaml block must start immediately after `---`.John MacFarlane1-0/+1
If there's a blank line after `---`, we interpreted it as a horizontal rule.
2013-09-14Markdown reader: unresolved citations fall back to original text.John MacFarlane1-11/+14
Not ???. Reason: Less surprising, especially for people using @ as in twitter.
2013-09-09Markdown: don't parse citation right after alphanumeric.John MacFarlane1-0/+5
An `@` after an alphanumeric is probably an email address.
2013-09-08markdown+list_without_preceding_blankline:+Interpret text before list as ↵John MacFarlane1-3/+5
paragraph.
2013-09-08Markdown: Allow backtick code blocks not to be preceded by blank line.John MacFarlane1-0/+3
Closes #975.
2013-09-07Added `lists_without_preceding_blankline` extension.John MacFarlane1-0/+1
* Added `Ext_lists_without_preceding_blankline` to `Extension` in `Options`. Added this option to `githubMarkdownExtensions`. * Made markdown reader sensitive to this. * Closes #972.
2013-09-01Markdown reader: Don't autolink a bare URI that is followed by `</a>`.John MacFarlane1-0/+1
Closes #937.
2013-09-01Factored out registerHeader from markdown reader, added to Parsing.John MacFarlane1-28/+2
Text.Pandoc.Parsing now exports registerHeader, which can be used in other readers.
2013-08-24Removed dependency on citeproc-hs.John MacFarlane1-4/+1
Going forward we'll use pandoc-citeproc, as an external filter. The `--bibliography`, `--csl`, and `--citation-abbreviation` fields have been removed. Instead one must include `bibliography`, `csl`, or `csl-abbrevs` fields in the document's YAML metadata. The filter can then be used as follows: pandoc --filter pandoc-citeproc The `Text.Pandoc.Biblio` module has been removed. Henceforth, `Text.CSL.Pandoc` from pandoc-citations can be used by library users. The Markdown and LaTeX readers now longer format bibliographies and citations. That must be done using `processCites` or `processCites'` from Text.CSL.Pandoc. All bibliography-related fields have been removed from `ReaderOptions` and `WriterOptions`: `writerBiblioFiles`, `readerReferences`, `readerCitationStyle`. API change.
2013-08-20Create Cite element even if no matching reference in the biblio.John MacFarlane1-9/+12
* 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.
2013-08-18Allow multiple YAML metadata blocks in document.John MacFarlane1-51/+56
2013-08-17Markdown reader: Parse span, div tags as Span, Div elements.John MacFarlane1-0/+22
Assuming markdown_in_html extension is set.
2013-08-17Markdown reader: Don't generate blank title, author, date elements.John MacFarlane1-3/+3
2013-08-07Allow YAML title blocks to contain only comments.John MacFarlane1-1/+4
2013-08-06Added support for MetaBool.John MacFarlane1-1/+1
2013-07-29Markdown atx headers: Allow `.` or `)` after `#` if no `fancy_lists`.John MacFarlane1-1/+2
2013-07-20Markdown reader: Improved strong/emph parsing.John MacFarlane1-34/+54
Using technique from github.com/jgm/Markdown. The new parsing algorithm requires no backtracking, and no keeping track of nesting levels. It will give different results in some edge cases but should not affect most people.
2013-07-17Added `ignore_line_breaks` markdown extension.John MacFarlane1-0/+1
This causes intra-paragraph line breaks to be ignored, rather than being treated as hard line breaks or spaces. This is useful for some East Asian languages, where spaces aren't used between words, but text is separated into lines for readability.
2013-07-02Rename `Ext_yaml_title_block` -> `Ext_yaml_metadata_block`.John MacFarlane1-1/+1
2013-07-02Markdown reader: Better error messages for yaml headers.John MacFarlane1-5/+18
2013-07-01Markdown reader: Ignore fields ending with _ in YAML headers.John MacFarlane1-2/+2
2013-07-01Emit warning instead of failing on invalid YAML header.John MacFarlane1-4/+10