aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
AgeCommit message (Collapse)AuthorFilesLines
2015-12-19Merge branch 'master' of https://github.com/AndreasLoow/pandoc into ↵John MacFarlane1-1/+6
AndreasLoow-master
2015-12-19Markdown reader: fixed parsing bug with macros.John MacFarlane1-1/+1
Previously macro definitions in indented code blocks were being parsed as macro definitions, not code.
2015-12-17ICML writer: intersperse line breaksmb211-12/+17
instead of appending them to every ParagraphStyleRange closes #2501
2015-12-16ICML writer: added figure handling, closes #2590mb211-3/+12
2015-12-13ICML writer: removed redundant import.John MacFarlane1-1/+0
2015-12-13Merge pull request #2570 from mb21/rst-reader-imgattrsJohn MacFarlane7-50/+94
Image attributes
2015-12-13Fixed ICML image syntax for local files.John MacFarlane1-1/+1
`file:filename` rather than `file://./filename`. I think this is right; it matches what we had before with people actually using the ICML writer, and seems to match examples in the spec. I don't have a copy of InDesign I can test on, though. @DigitalPublishingToolkit and @mb21, can you have a look?
2015-12-13Use posix path separators in ICML link URIs.John MacFarlane1-1/+1
Closes #2589.
2015-12-13ODT/OpenDocument writer: improved image attributesmb212-27/+34
- support for percentage widths/heights - use Attr instead of title to get dimensions from ODT walker to writeOpenDocument
2015-12-13Docx reader: image attributesmb212-10/+32
2015-12-13new function to extract multiple properties at once in CSS.hsmb212-6/+14
and use it in Textile reader
2015-12-13RST reader: image attributesmb211-7/+14
2015-12-13AsciiDoc writer: support anchors in spans with id elements.John MacFarlane1-1/+5
2015-12-13AsciiDoc writers: Add anchors on Div elements.John MacFarlane1-1/+4
This partially addresses jgm/pandoc-citeproc#143. It does not use the native asciidoc syntax for citations, but it does get the links to individual citations working.
2015-12-12Implemented `east_asian_line_breaks` extension.John MacFarlane2-1/+17
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.
2015-12-12Modified readers to emit SoftBreak when appropriate.John MacFarlane7-9/+19
2015-12-12Restore no wrapping of XML in Docx, ODT.John MacFarlane2-2/+2
It's possible that wrapping causes problems; safer to turn it off.
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-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 MacFarlane38-344/+728
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.