Commit graph

1164 commits

Author SHA1 Message Date
John MacFarlane
6532950b26 MediaBag: ensure that / is always used as path separator. 2015-09-26 22:40:58 -07:00
John MacFarlane
9b033672e4 Merge pull request #2406 from tarleb/org-verse-fix
Make sure verse blocks can contain empty lines
2015-09-20 13:02:47 -07:00
Albert Krewinkel
8007dd97b5 Make sure verse blocks can contain empty lines
The previous verse parsing code made the faulty assumption that empty
strings are valid (and empty) inlines.  This isn't the case, so lines
are changed to contain at least a newline.

It would generally be nicer and faster to keep the newlines while
splitting the string.  However, this would require more code, which
seems unjustified for a simple (and fairly rare) block as *verse*.

This fixes #2402.
2015-09-19 22:02:43 +02:00
Nikolay Yakimov
5788f62ef5 [RST Writer] Don't normalize heading levels below input minimum 2015-09-19 17:45:54 +03:00
John MacFarlane
6dcfa7e07b Tests: docx writer tests now use "../data" for data directory.
This allows tests  to be run without installing first.
2015-09-09 10:39:20 -07:00
John MacFarlane
8ae0c857f9 Use real jpg (not empty) for docx tests to avoid warning. 2015-08-15 10:40:22 -07:00
John MacFarlane
1f00a5395f RST reader: better handling of indirect roles.
Previously the parser failed on this kind of case

    .. role:: indirect(code)

    .. role:: py(indirect)
       :language: python

    :py:`hi`

Now it currectly recognizes `:py:` as a code role.

The previous test for this didn't work, because the
name of the indirect role was the same as the language
defined its parent, os it didn't really test for this
behavior.  Updated test.
2015-08-15 10:22:47 -07:00
John MacFarlane
8c579a5daa Merge pull request #2360 from jg/issue-2354
Org reader: add auto identifiers if not present on headers
2015-08-15 09:47:56 -07:00
Juliusz Gonera
f1c87ed164 Org reader: add auto identifiers if not present on headers
Refs #2354

This should also fix the table of contents (--toc) when generating a html file
from org input
2015-08-15 07:57:48 +02:00
John MacFarlane
7b8c005d07 EPUB reader: stop mangling external URLs.
Closes #2284.

Note the changes to the test suite. In each case, a mangled
external link has been fixed, so these are all positive.
2015-08-10 16:35:43 -07:00
John MacFarlane
3ad474e2cf Updated html reader for new automatic header attributes. 2015-08-08 20:55:40 -07:00
John MacFarlane
467e3be700 MediaWiki reader: handle unquoted table attributes.
Closes #2355.
2015-08-08 20:55:00 -07:00
John MacFarlane
74c31abb1a Merge pull request #2327 from hftf/list-style
HTML Reader: Correctly parse inline list-style(-type) for <ol>
2015-08-07 11:08:53 -07:00
John MacFarlane
0baaa1080a Pipe tables: allow indented columns.
Previously the left-hand column could not start with 4 or
more spaces indent.  This was inconvenient for right-aligned
left columns.

Note that the first (header column) must still have 3 or fewer
spaces indentation, or the table will be treated as an indented
code  block.
2015-07-27 10:24:06 -07:00
Ophir Lifshitz
490db2d7db HTML Reader: Test <ol> type, class, and inline list-style(-type) CSS 2015-07-24 02:53:44 -04:00
MarLinn
f068093555 Added odt reader
Fully implemented features:

* Paragraphs
* Headers
* Basic styling
* Unordered lists
* Ordered lists
* External Links
* Internal Links
* Footnotes, Endnotes
* Blockquotes

Partly implemented features:

* Citations
  Very basic, but pandoc can't do much more
* Tables
  No headers, no sizing, limited styling
2015-07-23 15:37:01 -07:00
John MacFarlane
8390d935d8 Updated tests and removed a skipSpaces....
we no longer need it with the change to toKey, and it
is expensive to skip spaces after every inline.
2015-07-23 15:35:18 -07:00
Ophir Lifshitz
53cb926232 Markdown Reader: Add basic tests for each header style 2015-07-23 02:31:24 -04:00
Ophir Lifshitz
0c7d0757d6 Markdown Reader: Add implicit header ref tests for headers with spaces 2015-07-23 02:31:03 -04:00
John MacFarlane
fa2c008ae5 Fix regression: allow HTML comments containing --.
Technically this isn't allowed in an HTML comment, but
we've always allowed it, and so do most other implementations.
It is handy if e.g. you want to put command line arguments
in HTML comments.
2015-07-21 22:44:18 -07:00
John MacFarlane
da0842b5b5 HTML reader: handle type attribute on ol.
E.g. `<ol type="i">`.

Closes #2313.
2015-07-21 13:07:52 -07:00
John MacFarlane
47a2dab137 Merge pull request #2303 from hftf/h6
Add missing Heading 6 style in reference Docx
2015-07-15 18:15:12 -07:00
Ophir Lifshitz
126d6f58df Docx Reader: Updated headers test
Replaced styles.xml in headers.docx with pandoc's current styles.xml, which
contains styles for Heading 1 through 6. Added Heading 4 through 7 to the test
document. Note that Heading 7 is not parsed as a Heading because there is no
Heading 7 style.
2015-07-15 19:52:05 -04:00
John MacFarlane
9e0fb844a9 Markdown reader: don't allow bare URI links or autolinks in link label.
Added test cases.

Closes #2300.
2015-07-14 13:16:40 -07:00
John MacFarlane
9cdfd4f649 Improved bare autolink detection.
Previously we disallowed `-` at the end of an autolink,
and disallowed the combination `=-`.

This commit liberalizes the rules for allowing punctuation in
a bare URI.

Added test cases.

One potential drawback is that you can no longer put a bare
URI in em dashes like this

    this uri---http://example.com---is an example.

But in this respect we now match github's treatment of bare URIs.

Closes #2299.
2015-07-14 10:24:39 -07:00
Tiziano Müller
f464e49142 DokuWiki: write $..$ instead of <math>..</math>
MathJax seems currently to be the only maintained math rendering
extension for DokuWiki and it uses $..$ instead of <math>..</math>.
2015-07-13 14:19:48 +02:00
John MacFarlane
653a7bbe21 Removed tabs from source. 2015-07-10 10:35:58 -07:00
John MacFarlane
99fe8594d9 Avoid parsing partial URLs as HTML tags.
Closes #2277.
2015-07-10 10:33:27 -07:00
John MacFarlane
b587acb224 Merge pull request #2266 from PromyLOPh/fieldinline
RST: Support inline markup for field list names
2015-07-08 22:45:06 -07:00
John MacFarlane
9e528f4c0c Fixed email javascript obfuscation with mailto: URLs.
This fixes a potential security issue.  Because single quotes weren't
being escaped in the link portion, a specially crafted email address
could allow javascript code injection.

    [Jim'+alert('hi')+'OBrien](mailto:me@example.com)

Closes #2280.
2015-07-07 11:15:40 -07:00
John MacFarlane
7398dea65f Updated context writer test. 2015-07-06 17:20:26 -07:00
Lars-Dominik Braun
d9e17cb3f7 Tests.Readers.RST: Test metadata with inline markup too 2015-07-03 16:57:30 +02:00
Lars-Dominik Braun
8577007d9b Tests.Readers.RST: Group field list tests 2015-07-03 16:44:02 +02:00
Lars-Dominik Braun
68b6b9f652 Readers.RST: Parse field list name
“Inline markup is parsed in field names.” [1]

[1] http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#field-lists
2015-07-03 16:41:28 +02:00
Michael Chladek
125b0c7359 Do not add a carriage return after a hard line break in OpenDocument writer and reflect change in tests. 2015-07-01 09:43:36 -05:00
Lars-Dominik Braun
3b2c50ed93 Fix RST reference names with special characters 2015-06-29 18:34:45 +02:00
John MacFarlane
7df4d86006 Textile writer: escape + and - as entities.
Closes #2225.
2015-06-27 20:30:20 -07:00
John MacFarlane
fce3ebb8e0 Plain writer: don't use symbols for super/subscript.
Simplified code by using plainExtensions from Options.

Closes #2237.
2015-06-27 20:19:04 -07:00
John MacFarlane
ba76e6fcf1 Updated latex writer tests for last template change. 2015-06-27 18:37:59 -07:00
mb21
82e363a727 DocBook reader mediaobjects and figures, closes #2184 2015-06-21 18:36:47 +02:00
John MacFarlane
767be5a97b Fixed tests/docx/links.docx for new url. 2015-06-09 16:55:38 -07:00
Pablo Rodríguez
c18e93ca6e replace old url with pandoc.org 2015-06-09 22:22:58 +02:00
gohai
f51757bd16 Fix InDesign crash with URLs containing more than one colon character
Colons are valid characters in URLs, and used e.g. by the Internet Archive's Wayback Machine - a popular resource amongst researchers. When InDesign encounters a HyperlinkURLDestination with more than one colon character in it, it crashes when placing the ICML. (This was tested against CS6.) The IDML specification hints at this requirement in section 6.4.1: "The colon apppears in the Name attribute of the style, but is encoded as %3a when it appears in the Self attribute". Follow this example for all colon characters in URLs.
2015-06-09 15:46:23 +02:00
John MacFarlane
7b4f077652 DokuWiki writer: Use proper <code> tags for code blocks.
Closes #2213.
2015-06-07 11:29:47 -07:00
John MacFarlane
68b460db92 LaTeX template: Move hyperref before polyglossia.
This avoids an error "Please load package hyperref before bidi package,
and then try to run xelatex on your document again".  See
jgm/pandoc-templates #96.
2015-05-27 12:30:10 -07:00
John MacFarlane
fe66122b61 Merge pull request #2169 from tarleb/org-header-tags
Org reader: put header tags into empty spans
2015-05-26 17:14:29 -07:00
John MacFarlane
c3cb27f2f2 Merge pull request #2141 from DigitalPublishingToolkit/icml-images
Fix image URIs in ICML output
2015-05-26 17:14:10 -07:00
John MacFarlane
6397c10dec Updated tests for new highlighting-kate. 2015-05-26 17:11:28 -07:00
Albert Krewinkel
385dcf5b99 Org reader: drop trees with a :noexport: tag
Trees having a `:noexport:` tag set are not exported.  This mirrors
default Emacs Org-Mode behavior.
2015-05-23 14:23:16 +02:00
Albert Krewinkel
d8e4a8bc10 Org reader: put header tags into empty spans
Org mode allows headers to be tagged:

``` org-mode
* Headline         :TAG1:TAG2:
```

Instead of being interpreted as part of the headline, the tags are now
put into the attributes of empty spans.  Spans without textual content
won't be visible by default, but they are detectable by filters.  They
can also be styled using CSS when written as HTML.

This fixes #2160.
2015-05-23 14:06:32 +02:00