aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/Markdown.hs
AgeCommit message (Collapse)AuthorFilesLines
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
2013-01-25Markdown reader: Moved guardEnabled to definitionList.John MacFarlane1-1/+1
From definitionListItem. Slight performance improvement.
2013-01-25Markdown reader: Performance improvement in str parser.John MacFarlane1-3/+6
Moved a guardEnabled out of an inner loop.
2013-01-25Use anyLine everywhere instead of 'manyTill anyChar newline'.John MacFarlane1-3/+3
2013-01-25Markdown reader: More efficient version of scanForPipe.John MacFarlane1-1/+5
2013-01-23Fixed regressions in fenced code blocks.John MacFarlane1-16/+6
* Tilde code fences can again take bare language. So ~~~ haskell is okay, not just ~~~ {.haskell} * Backtick code blocks can take the bracketed attributes. * Backtick code blocks don't require a language. * Consolidated code for the two kinds of fenced code blocks. Closes #722.
2013-01-21Markdown reader: Try lhsCodeBlock before rawTeXBlock.John MacFarlane1-1/+1
Otherwise \begin{code}...\end{code} isn't handled properly in markdown+lhs. Thanks to Daniel Miot for noticing the bug and suggesting the fix.
2013-01-21Markdown reader: Fixed bug with headerless grid tables.John MacFarlane1-2/+2
The 1.10 code assumed that each table header cell contains exactly one block. That failed for headerless tables (0) and also for tables with multiple blocks in a header cell. The code is fixed and tests provided. Thanks to Andrew Lee for pointing out the bug.
2013-01-17Revert "Markdown reader: Be less restrictive about class attributes."John MacFarlane1-1/+1
This reverts commit b158b3fb2182b5c8a6f03759277f4f73cdc24797.
2013-01-16Markdown reader: Be less restrictive about class attributes.John MacFarlane1-1/+1
This allows attributes like `C++`. Any nonspace and non-}.
2013-01-16Implemented Ext_link_attributes in markdown reader.John MacFarlane1-31/+26
Also simplified source URL and link title parsers.
2013-01-16Implemented Ext_mmd_header_identifiers in markdown reader.John MacFarlane1-4/+22
2013-01-15Changed Ext_autolink_urls -> Ext_autolink_bare_uris.John MacFarlane1-1/+1
Added tests.
2013-01-15Use 'fig:' instead of '\SOH' in title to indicate figure.John MacFarlane1-2/+2
Revises 1a4b47e93368bfbd31daccdfedbd9527ee740201
2013-01-14Implemented Ext_implicit_figures.John MacFarlane1-6/+16
* In markdown reader, add a '\1' character to the beginning of the title of an image that is alone in its paragraph, if implicit_figures extension is selected. * In writers, check for Para [Image alt (src,'\1':tit)] and treat it as a figure if possible. * Updated tests. This is a bit of a hack, but it allows us to make implicit_figures an extension of the markdown reader, rather than the writers.
2013-01-14Removed some cruft.John MacFarlane1-10/+0
2013-01-13Markdown reader: Support RST-style line blocks.John MacFarlane1-1/+13
This depends on the new Ext_line_blocks extension.
2013-01-10Implemented Ext_header_attributes.John MacFarlane1-12/+20
This allows explicit attributes to be put on headers, using a syntax like that for code blocks: {#id .class .class k=v k=v}
2013-01-10Ext_header_identifiers -> Ext_auto_identifiers.John MacFarlane1-1/+1
2013-01-09Added Attr field to Header.John MacFarlane1-8/+14
Previously header ids were autogenerated by the writers. Now they are generated (unless supplied explicitly) in the markdown parser, if the `header_identifiers` extension is selected. In addition, the textile reader now supports id attributes on headers.
2013-01-08Added / to the list of letters that can occur in a citation key.John MacFarlane1-1/+1
2013-01-06Don't put the text of an autolink in Code font.John MacFarlane1-2/+2
2013-01-04Markdown reader: Warn about duplicate note references.John MacFarlane1-1/+6
Closes #375.
2013-01-04Markdown reader: Warn about duplicate link references.John MacFarlane1-1/+12
2013-01-04Markdown reader: Export readMarkdownWithWarnings.John MacFarlane1-1/+14
Note: This is not yet used, and the parser does not yet generate any warnings.
2013-01-03Implemented `Ext_header_identifiers`, `Ext_implicit_header_references`.John MacFarlane1-143/+163
Now by default pandoc will act as if link references have been defined for all headers. So, you can do this: # My header Link to [My header]. Another link to [it][My header]. Closes #691.
2012-10-21Revert "LaTeX reader: Use new suppressParens option for footnote citations."John MacFarlane1-16/+14
This reverts commit 7499499b68934ae6f3418940328c7fc2bd9fcadd. Conflicts: src/Text/Pandoc/Readers/LaTeX.hs
2012-10-15LaTeX reader: Use new suppressParens option for footnote citations.John MacFarlane1-14/+16
Also changed Biblio, Markdown reader, and LaTeX reader tests because of new citationSuppressParens field in Citation.
2012-10-13Moved bibliography processing into readers.John MacFarlane1-3/+8
Previously this was done in src/pandoc.hs, which made it difficult for library users. * Removed readerCitations in ReaderOptions. * Added readerReferences and readerCitationStyle to ReaderOptions. * Moved use of processBiblio from main program to the markdown and LaTeX readers.
2012-09-29Renamed removedLeadingTrailingSpace to trim.John MacFarlane1-9/+9
Also removeLeadingSpace to triml, removeTrailingSpace to trimr.
2012-09-29Markdown reader: Worked around some sepBy's.John MacFarlane1-8/+11
2012-09-27Shared: Export compactify', formerly in Markdown reader.John MacFarlane1-21/+7