aboutsummaryrefslogtreecommitdiff
path: root/src/Text
AgeCommit message (Collapse)AuthorFilesLines
2015-12-12Fixed cite key parsing regression.John MacFarlane1-1/+1
We were capturing final colons as in [@foo: bar]; the citation id was being parsed as "@foo:". Closes jgm/pandoc-citeproc#201.
2015-12-12FB2 writer: support SoftBreak.John MacFarlane1-1/+2
This was omitted earlier.
2015-12-11Implemented SoftBreak and new `--wrap` option.John MacFarlane28-78/+199
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.
2015-12-11Markdown reader: parse soft break as SoftBreak.John MacFarlane1-1/+1
2015-12-04Fixed Emoji character definitions.John MacFarlane1-870/+871
There were many bugs in the definitions. Closes #2523.
2015-12-03Markdown reader: Improved pipe table relative widths.John MacFarlane1-4/+4
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.
2015-12-03Add support to GAPRaniere Silva1-1/+2
2015-12-03Textile Reader: image attributesmb211-2/+9
closes #2515
2015-12-02Parse CSS that doesn't contain the optional semicolonmb211-1/+1
2015-12-01Docx writer: better handling of PDF images.John MacFarlane1-8/+2
Previously we tried to get the image size from the image even if an explicit size was specified. Since we still can't get image size for PDFs, this made it impossible to use PDF images in docx. Now we don't try to get the image size when a size is already explicitly specified.
2015-11-24Markdown writer: use raw HTML for link/image attributes whenJohn MacFarlane1-2/+12
the `link_attributes` extension is unset and `raw_html` is set. Closes #2554.
2015-11-24Allow pipe tables with no body rows.John MacFarlane1-2/+3
Previously this raised a runtime error. Closes #2556.
2015-11-24LaTeX reader: Improved smart quote parsing.John MacFarlane1-14/+13
This fixes redering of unmatched quotes. Closes #2555.
2015-11-24Improved fetchItem so that C:/Blah/Blah.jpg isn't treated as URL.John MacFarlane1-6/+19
The Haskell URI parsing routines will accept "C:" as a scheme, so we rule that out manually. This helps with `--self-contained` and absolute Windows paths. See http://stackoverflow.com/questions/33899126/rchart-in-markdown-doesnt-render-due-to-invalidurlexception-from-pandoc
2015-11-23LaTeX reader: Use curly quotes for unmatched `.John MacFarlane1-1/+8
Partially addresses #2555. Note that there's still a problem with the code sample given.
2015-11-23Beamer writer: mark frame as fragile when it contains verbatim.John MacFarlane1-5/+1
Closes #1613.
2015-11-23AsciiDoc writer: Fixed code blocks.John MacFarlane1-7/+6
Closes #1861.
2015-11-23Define a `meta-json` variable for all writers.John MacFarlane2-3/+6
This contains a JSON version of all the metadata, in the format selected for the writer. So, for example, to get just the YAML metadata, you can run pandoc with the following custom template: $meta-json$ Closes #2019. The intent is to make it easier for static site generators and other tools to get at the metadata.
2015-11-23Docx Reader: Remove DummyListItem typeJesse Rosenthal2-12/+7
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.
2015-11-22hlint fixesJohn MacFarlane1-1/+1
2015-11-22hlint fixesJohn MacFarlane1-12/+13
2015-11-22hlint changesJohn MacFarlane1-3/+1
2015-11-22hlint fixes.John MacFarlane1-3/+1
2015-11-22hlint fixes.John MacFarlane1-5/+5
2015-11-21ImageSize: use safeRead instead of readMaybe.John MacFarlane1-2/+1
readMaybe is only provided in base 4.6+.
2015-11-19Renamed link attribute extensions.John MacFarlane3-10/+10
* Old `link_attributes` -> `mmd_link_attributes` * Recently added `common_link_attributes` -> `link_attributes` Note: this change could break some existing workflows.
2015-11-19Merge branch 'new-image-attributes' of https://github.com/mb21/pandoc into ↵John MacFarlane39-345/+729
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.
2015-11-19Merge pull request #2532 from michaelbeaumont/fix-2530John MacFarlane1-5/+3
Interpret pauses correctly for all headers
2015-11-19Merge pull request #2506 from adunning/patch-1John MacFarlane1-3/+0
Remove redundant `center` variable for reveal.js.
2015-11-19Rationalized behavior of --no-tex-ligatures and --smart.John MacFarlane1-9/+15
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.
2015-11-18Docx reader: Clean up commented-out functionJesse Rosenthal1-7/+0
A residue of a recent change was left around in the form of a commented-out function. Let's clean that up.
2015-11-18Docx reader: Handle dummy list items.Jesse Rosenthal2-6/+15
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.
2015-11-16Haddock writer: omit formatting inside links.John MacFarlane1-2/+2
It isn't supported by Haddock. Closes #2515.
2015-11-16Textile reader: skip over attribute in image source.John MacFarlane1-0/+1
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.
2015-11-16ICML writer: better handling of math.John MacFarlane1-1/+3
Instead of just printing the raw tex, we now try to fake it with unicode characters.
2015-11-16HTML writer: Include `example` class for example lists.John MacFarlane1-0/+3
Closes #2524.
2015-11-15Docx writer: insert space between footnote ref and footnote.John MacFarlane1-2/+2
This matches Word's default behavior. Closes #2527.
2015-11-14Derive Generic instances for types in Text.Pandoc.Options.John MacFarlane1-10/+11
2015-11-14Allow more customization of opendocument styles.John MacFarlane1-2/+1
Automatic styles can now be inserted in the template, since the template, not the writer, now provides the enclosing `<office:automatic-styles>` tags. Closes #2520.
2015-11-15Interpret pauses correctly for all headersmichaelbeaumont1-5/+3
Previously, when using headers below the slide level, pauses are left uninterpreted into pauses. In my opinion, unexpected behavior but intentional looking at the code. Fixes #2530
2015-11-14Follow relationships correctly in foot/endnotes.Jesse Rosenthal1-27/+40
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.
2015-11-13Text.Pandoc.Emoji: use hex escapes instead of Unicode in source.John MacFarlane1-870/+870
Some of the unicode characters cause ghc parse errors in older ghc versions.
2015-11-13Merge pull request #2526 from tarleb/org-definition-lists-fixJohn MacFarlane1-1/+4
Org reader: Require whitespace around def list markers
2015-11-13Org reader: Require whitespace around def list markersAlbert Krewinkel1-1/+4
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.
2015-11-13Merge pull request #2525 from tarleb/org-smart-fixesJohn MacFarlane1-4/+9
Org reader: Fix emphasis rules for smart parsing
2015-11-13Added `emoji` extension to Markdown.John MacFarlane3-0/+924
This is enabled by default in `markdown_github`. Added `Ext_emoji` to `Extension` in `Text.Pandoc.Options` (API change). Closes #2523.
2015-11-13Org reader: Fix emphasis rules for smart parsingAlbert Krewinkel1-4/+9
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.
2015-11-13Allow `://` in citation keys.John MacFarlane1-1/+2
Closes jgm/pandoc-citeproc#166.
2015-11-12EPUB writer: don't download linked media when `data-external` attribute set.John MacFarlane1-1/+2
By default pandoc downloads all linked media and includes it in the EPUB container. This can be disabled by setting `data-external` on the tags linking to media that should not be downloaded. Example: <audio controls="1"> <source src="http://www.sixbarsjail.it/tmp/bach_toccata.mp3" type="audio/mpeg"></source> </audio> Closes #2473.
2015-11-12LaTeX writer: set `colorlinks`...John MacFarlane1-1/+4
if `linkcolor`, `urlcolor`, `citecolor`, or `toccolor` is set. Closes #2508.