aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/Markdown.hs
AgeCommit message (Collapse)AuthorFilesLines
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
2013-06-24Use new flexible metadata type.John MacFarlane1-17/+76
* Depend on pandoc 1.12. * Added yaml dependency. * `Text.Pandoc.XML`: Removed `stripTags`. (API change.) * `Text.Pandoc.Shared`: Added `metaToJSON`. This will be used in writers to create a JSON object for use in the templates from the pandoc metadata. * Revised readers and writers to use the new Meta type. * `Text.Pandoc.Options`: Added `Ext_yaml_title_block`. * Markdown reader: Added support for YAML metadata block. Note that it must come at the beginning of the document. * `Text.Pandoc.Parsing.ParserState`: Replace `stateTitle`, `stateAuthors`, `stateDate` with `stateMeta`. * RST reader: Improved metadata. Treat initial field list as metadata when standalone specified. Previously ALL fields "title", "author", "date" in field lists were treated as metadata, even if not at the beginning. Use `subtitle` metadata field for subtitle. * `Text.Pandoc.Templates`: Export `renderTemplate'` that takes a string instead of a compiled template.. * OPML template: Use 'for' loop for authors. * Org template: '#+TITLE:' is inserted before the title. Previously the writer did this.
2013-06-19Markdown reader: Check for blank lines first in blocks.John MacFarlane1-2/+2
(And skip them. This might speed things up in some cases.)
2013-06-19Properly handle blank line at beginning of input.John MacFarlane1-1/+1
Closes #882.
2013-06-19Improved code readability.John MacFarlane1-11/+15
2013-06-19Markdown reader: fixed bug in unmatched reference links.John MacFarlane1-7/+12
The input [*infile*] [*outfile*] was getting improperly parsed: "infile" was emphasized, but "*outfile*" was literal. This was due to failure to parse the "fallback" in the reference link parser. Closes #883.
2013-05-13Markdown reader: Allow internal `+` in citation identifiers.John MacFarlane1-1/+1
Closes #856.
2013-04-23Markdown reader: Implemented `Ext_ascii_identifiers`.John MacFarlane1-2/+8
Closes #807.
2013-04-19Markdown reader: minor code cleanup.John MacFarlane1-2/+2
2013-03-13Markdown reader: don't lose parentheses in URLs.John MacFarlane1-3/+7
Added tests. This fixes a regression from 1.10.x. Closes #786.
2013-03-12Markdown reader: Handle unmatched double quotes in dialogues.John MacFarlane1-3/+8
They do not generate a Quoted element; instead, the double quote is just turned into a Str with a curly left quote. This should satisfy the fiction writers. Closes #99 (again).
2013-03-02Markdown reader: attribute parsing improvements.John MacFarlane1-14/+15
* Cleaned up parsing code. * '-' in an attribute context = '.unnumbered'. The point of this is to provide a way to specify unnumbered headers in non-English documents.
2013-03-02Check for tables before line blocks.John MacFarlane1-1/+1
Otherwise some pipe tables get treated as line blocks.
2013-03-02Markdown reader: Allow spaces around borders in pipe tables.John MacFarlane1-1/+3
Closes #772.
2013-02-28Markdown: allow ---- in angle-bracket autolinks.John MacFarlane1-2/+7
The uri parser is designed for bare URIs. In angle-bracket contexts, we can be sure that we don't have trailing punctuation. So `<http://openclipart.org/detail/22566/lego-smiley----happy-by-pitr>` should work now. Closes #768.
2013-02-21Make `implicit_header_references` work with explicit header ids.John MacFarlane1-16/+23
(Markdown reader.)
2013-02-15Allow `&` in emails (for entities).John MacFarlane1-1/+1
Added tests for entities in titles and links. Closes #723.
2013-02-15Markdown reader: litChar now includes entities.John MacFarlane1-4/+4
We no longer need to use fromEntities on titles.
2013-02-12Markdown reader: Fix title block parsing.John MacFarlane1-1/+4
Now if mmd_title_blocks is specified, pandoc will parse a MMD title block if it sees one, even if pandoc_title_blocks is enabled.
2013-02-12Markdown reader: Make backslash escape work in attributes.John MacFarlane1-9/+9
2013-02-12Markdown reader: Fixed bug parsing key/value attributes.John MacFarlane1-1/+1
Parsing failed if you had an unquoted attribute immediately before the final '}'.
2013-02-06Revert "Citation changes."John MacFarlane1-14/+8
This reverts commit d46f434d4b8906ae3b983e568549213de94fd1a2.
2013-02-05Merge branch 'citations'John MacFarlane1-8/+14
2013-02-05Added `--default-image-extension` and `readerDefaultImageExtension`.John MacFarlane1-1/+6
Note: Currently this only affects the markdown reader.
2013-02-03Citation changes.John MacFarlane1-8/+14
* Citations will work in markdown even if `--biblio` isn't specified. Note: this may cause unexpected behavior for people who use strings of the form `@foo` that are not citations! * If `--biblio` isn't used, the markdown writer will write markdown citations rather than CSL-rendered citations. * This means, for example, that you can do `pandoc -f latex -t markdown` and convert biblatex or natbib citations into pandoc citations.
2013-02-02Removed unneeded blanklines in pipeTable parser.John MacFarlane1-1/+0
2013-01-28Fixed latex macro parsing.John MacFarlane1-1/+1
Now latex macro definitions are preserved when output is latex, and applied when it is another format, as originally intended. Partially addresses #730. \providecommand is still not supported. For this we need changes to texmath.
2013-01-27Markdown/RST reader: Skip blank lines.John MacFarlane1-1/+2
This fixes a subtle regression involving grid tables with empty cells. Closes #732. Also added test for grid table with empty cells.
2013-01-25Markdown reader: Simplified and sped up str parser.John MacFarlane1-15/+9
We no longer needed the smart quote complexity, because of improvements to singleQuoteStart and singleQuoteEnd. And we were able to move the check for intraword underscore to the emphasis parser.
2013-01-25Changed copyright date range on Markdown reader.John MacFarlane1-1/+1
2013-01-25Minor code cleanup.John MacFarlane1-7/+6