summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
Commit message (Collapse)AuthorAge
...
* | Properly handle LaTeX "math" environment as inline math.John MacFarlane2016-01-29
| | | | | | | | See #2171.
* | Textile reader: Support `>`, `<`, `=`, `<>` text alignment attributes.John MacFarlane2016-01-25
| | | | | | | | Closes #2674.
* | Changed type of Shared.uniqueIdent argument from [String] to Set String.John MacFarlane2016-01-22
|/ | | | | | | This avoids performance problems in documents with many identically named headers. Closes #2671.
* Depend on deepseq rather than deepseq-generics.John MacFarlane2016-01-11
| | | | See fpco/stackage#1096.
* Fixed regression in latex smart quote parsing.John MacFarlane2016-01-11
| | | | | | | Closes #2645. In cases where a match was not found for a quote, everything from the open quote to the end of the paragraph was being dropped.
* Merge pull request #2629 from tarleb/org-noexport-fixJohn MacFarlane2016-01-07
|\ | | | | Fix function dropping subtrees tagged :noexport:
| * Fix function dropping subtrees tagged :noexport:Albert Krewinkel2016-01-07
| | | | | | | | | | | | | | | | | | | | | | Continue scanning for comment subtrees beyond only the first block. Note to self: when writing an recursive function, don't forget to, you know, actually recurse. Shout to @mrvdb for noticing this. This fixes #2628.
* | Markdown reader: renormalize table column widths if they exceed 100%.John MacFarlane2016-01-07
|/ | | | Closes #2626.
* Textile reader: don't allow block HTML tags in inline contexts.John MacFarlane2016-01-02
| | | | | | | | | | | | | | | | | | | | | The reader previously did allow this, following redcloth, which happily parses Html blocks can be <div>inlined</div> as well. as <p>Html blocks can be <div>inlined</div> as well.</p> This is invalid HTML, and this kind of thing can lead to parsing problems (stack overflows) as well. So this commit undoes this behavior. The above sample now produces; <p>Html blocks can be</p> <div> <p>inlined</p> </div> <p>as well.</p>
* MediaWiki reader: interpret markup inside `<tt>`, `<code>`.John MacFarlane2016-01-02
| | | | Closes #2607.
* Use cmark 0.5.John MacFarlane2015-12-29
| | | | Closes #2605.
* LaTeX reader: allow blank space between braced arguments of commands.John MacFarlane2015-12-22
| | | | | | | | | | For example \foo {bar} {baz} Closes #2592.
* Markdown reader: fixed parsing bug with macros.John MacFarlane2015-12-19
| | | | | Previously macro definitions in indented code blocks were being parsed as macro definitions, not code.
* Docx reader: image attributesmb212015-12-13
|
* new function to extract multiple properties at once in CSS.hsmb212015-12-13
| | | | and use it in Textile reader
* RST reader: image attributesmb212015-12-13
|
* Implemented `east_asian_line_breaks` extension.John MacFarlane2015-12-12
| | | | | | | | | | | | Text.Pandoc.Options: Added `Ext_east_asian_line_breaks` constructor to `Extension` (API change). This extension is like `ignore_line_breaks`, but smarter -- it only ignores line breaks between two East Asian wide characters. This makes it better suited for writing with a mix of East Asian and non-East Asian scripts. Closes #2586.
* Modified readers to emit SoftBreak when appropriate.John MacFarlane2015-12-12
|
* Implemented SoftBreak and new `--wrap` option.John MacFarlane2015-12-11
| | | | | | | | | | | | | | | | Added threefold wrapping option. * Command line option: deprecated `--no-wrap`, added `--wrap=[auto|none|preserve]` * Added WrapOption, exported from Text.Pandoc.Options * Changed type of writerWrapText in WriterOptions from Bool to WrapOption. * Modified Text.Pandoc.Shared functions for SoftBreak. * Supported SoftBreak in writers. * Updated tests. * Updated README. Closes #1701.
* Markdown reader: parse soft break as SoftBreak.John MacFarlane2015-12-11
|
* Markdown reader: Improved pipe table relative widths.John MacFarlane2015-12-03
| | | | | | | | | | | | Previously pipe table columns got relative widths (based on the header underscore lines) when the source of one of the rows was greater in width than the column width. This gave bad results in some cases where much of the width of the row was due to nonprinting material (e.g. link URLs). Now pandoc only looks at printable width (the width of a plain string version of the source), which should give better results. Thanks to John Muccigrosso for bringing up the issue.
* Textile Reader: image attributesmb212015-12-03
| | | | closes #2515
* Allow pipe tables with no body rows.John MacFarlane2015-11-24
| | | | | | Previously this raised a runtime error. Closes #2556.
* LaTeX reader: Improved smart quote parsing.John MacFarlane2015-11-24
| | | | | This fixes redering of unmatched quotes. Closes #2555.
* LaTeX reader: Use curly quotes for unmatched `.John MacFarlane2015-11-23
| | | | | | Partially addresses #2555. Note that there's still a problem with the code sample given.
* Docx Reader: Remove DummyListItem typeJesse Rosenthal2015-11-23
| | | | | | | | | | | | | Change 5527465c introduced a `DummyListItem` type in Docx/Parse.hs. In retrospect, this seems like it mixes parsing and iterpretation excessively. What's *really* going on is that we have a list item without and associate level or numeric info. We can decide what to do what that in Docx.hs (treat it like a list paragraph), but the parser shouldn't make that decision. This commit makes what is going on a bit more explicit. `LevelInfo` is now a Maybe value in the `ListItem` type. If it's a Nothing, we treat it as a ListParagraph. If it's a Just, it's a normal list item.
* Renamed link attribute extensions.John MacFarlane2015-11-19
| | | | | | | * Old `link_attributes` -> `mmd_link_attributes` * Recently added `common_link_attributes` -> `link_attributes` Note: this change could break some existing workflows.
* Merge branch 'new-image-attributes' of https://github.com/mb21/pandoc into ↵John MacFarlane2015-11-19
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mb21-new-image-attributes * Bumped version to 1.16. * Added Attr field to Link and Image. * Added `common_link_attributes` extension. * Updated readers for link attributes. * Updated writers for link attributes. * Updated tests * Updated stack.yaml to build against unreleased versions of pandoc-types and texmath. * Fixed various compiler warnings. Closes #261. TODO: * Relative (percentage) image widths in docx writer. * ODT/OpenDocument writer (untested, same issue about percentage widths). * Update pandoc-citeproc.
| * Updated readers, writers and README for link attributemb212015-08-07
| |
| * Updated readers and writers for new image attribute parameter.John MacFarlane2015-08-07
| | | | | | | | (mb21)
* | Rationalized behavior of --no-tex-ligatures and --smart.John MacFarlane2015-11-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change makes `--no-tex-ligatures` affect the LaTeX reader as well as the LaTeX and ConTeXt writers. If it is used, the LaTeX reader will parse characters `` ` ``, `'`, and `-` literally, rather than parsing ligatures for quotation marks and dashes. And the LaTeX writer will print unicode quotation mark and dash characters literally, rather than converting them to the standard ASCII ligatures. Note that `--smart` has no affect on the LaTeX reader. `--smart` is still the default for all input formats when LaTeX or ConTeXt is the output format, *unless* `--no-tex-ligatures` is used. Some examples to illustrate the logic: ``` % echo "'hi'" | pandoc -t latex `hi' % echo "'hi'" | pandoc -t latex --no-tex-ligatures 'hi' % echo "'hi'" | pandoc -t latex --no-tex-ligatures --smart ‘hi’ % echo "'hi'" | pandoc -f latex --no-tex-ligatures <p>'hi'</p> % echo "'hi'" | pandoc -f latex <p>’hi’</p> ``` Closes #2541.
* | Docx reader: Clean up commented-out functionJesse Rosenthal2015-11-18
| | | | | | | | | | A residue of a recent change was left around in the form of a commented-out function. Let's clean that up.
* | Docx reader: Handle dummy list items.Jesse Rosenthal2015-11-18
| | | | | | | | | | | | | | | | | | | | | | | | These come up when people create a list item and then delete the bullet. It doesn't refer to any real list item, and we used to ignore it. We handle it with a DummyListItem type, which, in Docx.hs, is turned into a normal paragraph with a "ListParagraph" class. If it follow another list item, it is folded as another paragraph into that item. If it doesn't, it's just its own (usually indented, and therefore block-quoted) paragraph.
* | Textile reader: skip over attribute in image source.John MacFarlane2015-11-16
| | | | | | | | | | | | | | | | We don't have a place yet for styles or sizes on images, but we can skip the attributes rather than incorrectly taking them to be part of the filename. Closes #2515.
* | Follow relationships correctly in foot/endnotes.Jesse Rosenthal2015-11-14
| | | | | | | | | | | | There are separate relationship (link) files for foot and endnotes. These had previously been grouped together which led to links not working correctly in notes. This should finally fix that.
* | Merge pull request #2526 from tarleb/org-definition-lists-fixJohn MacFarlane2015-11-13
|\ \ | | | | | | Org reader: Require whitespace around def list markers
| * | Org reader: Require whitespace around def list markersAlbert Krewinkel2015-11-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Definition list markers (i.e. double colons `::`) must be surrounded by whitespace to start a definition item. This rule was not checked before, resulting in bugs with footnotes and some link types. Thanks to @conklech for noticing and reporting this issue. This fixes #2518.
* | | Merge pull request #2525 from tarleb/org-smart-fixesJohn MacFarlane2015-11-13
|\ \ \ | | | | | | | | Org reader: Fix emphasis rules for smart parsing
| * | | Org reader: Fix emphasis rules for smart parsingAlbert Krewinkel2015-11-13
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Smart quotes, ellipses, and dashes should behave like normal quotes, single dashes, and dots with respect to text markup parsing. The parser state was not updated properly in all cases, which has been fixed. Thanks to @conklech for reporting this issue. This fixes #2513.
* / / Added `emoji` extension to Markdown.John MacFarlane2015-11-13
|/ / | | | | | | | | | | | | This is enabled by default in `markdown_github`. Added `Ext_emoji` to `Extension` in `Text.Pandoc.Options` (API change). Closes #2523.
* | Restored Text.Pandoc.Compat.Monoid.John MacFarlane2015-11-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't use custom prelude for latest ghc. This is a better approach to making 'stack ghci' and 'cabal repl' work. Instead of using NoImplicitPrelude, we only use the custom prelude for older ghc versions. The custom prelude presents a uniform API that matches the current base version's prelude. So, when developing (presumably with latest ghc), we don't use a custom prelude at all and hence have no trouble with ghci. The custom prelude no longer exports (<>): we now want to match the base 4.8 prelude behavior.
* | Revert "Use -XNoImplicitPrelude and 'import Prelude' explicitly."John MacFarlane2015-11-09
| | | | | | | | This reverts commit c423dbb5a34c2d1195020e0f0ca3aae883d0749b.
* | Merge pull request #2502 from minoki/latex-comment-environmentJohn MacFarlane2015-11-08
|\ \ | | | | | | LaTeX reader: Handle `comment` environment.
| * | LaTeX reader: Handle `comment` environment.ARATA Mizuki2015-11-08
| | | | | | | | | | | | The `comment` environment is handled in a similar way to the `verbatim` environment, except that its content is discarded.
* | | Merge pull request #2505 from tarleb/org-header-markup-fixJohn MacFarlane2015-11-08
|\ \ \ | | | | | | | | Org reader: fix markup parsing in headers
| * | | Org reader: fix markup parsing in headersAlbert Krewinkel2015-11-08
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Markup as the very first item in a header wasn't recognized. This was caused by an incorrect parser state: positions at which inline markup can start need to be marked explicitly by changing the parser state. This wasn't done for headers. The proper function to update the state is now called at the beginning of the header parser, fixing this issue. This fixes #2504.
* / / Use -XNoImplicitPrelude and 'import Prelude' explicitly.John MacFarlane2015-11-08
|/ / | | | | | | | | | | | | This is needed for ghci to work with pandoc, given that we now use a custom prelude. Closes #2503.
* | Pipe tables with long lines now get relative cell widths.John MacFarlane2015-10-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a pipe table contains a line longer than the column width (as set by `--columns` or 80 by default), relative widths are computed based on the widths of the separator lines relative to the column width. This should solve persistent problems with long pipe tables in LaTeX/PDF output, and give more flexibility for determining relative column widths in other formats, too. For narrower pipe tables, column widths of 0 are used, telling pandoc not to specify widths explicitly in output formats that permit this. Closes #2471.
* | Textile reader: don't do smart punctuation unless explicitly asked.John MacFarlane2015-10-30
| | | | | | | | | | | | | | | | Closes #2480. Note that although smart punctuation is part of the textile spec, it's not always wanted when converting from textile to, say, Markdown. So it seems better to make this an option.
* | Markdown reader: improved parser for `mmd_title_block`.John MacFarlane2015-10-26
| | | | | | | | | | | | | | | | | | We now allow blank metadata fields. These were explicitly disallowed before. For background see #2026. The issue in #2026 has since been fixed in another way, so there is no need to forbid blank metadata fields.