Commit graph

1149 commits

Author SHA1 Message Date
Ophir Lifshitz
490db2d7db HTML Reader: Test <ol> type, class, and inline list-style(-type) CSS 2015-07-24 02:53:44 -04: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
John MacFarlane
24ee1ab4f7 Markdown reader: Made implicit header references case-insensitive.
Added `stateHeaderKeys` to `ParserState`; this is a `KeyTable`
like `stateKeys`, but it only gets consulted if we don't find
a match in `stateKeys`, and if `Ext_implicit_header_references`
is enabled.

Closes #1606.
2015-05-13 23:12:58 -07:00
John MacFarlane
e06810499e HTML reader: Support base tag.
We only support the href attribute, as there's no place for
"target" in the Pandoc document model for links.

Added HTML reader test module, with tests for this feature.

Closes #1751.
2015-05-13 20:53:19 -07:00
John MacFarlane
c9cb313a47 Fixed regression in charsInBalancedBrackets.
Introduced by e9d7504.

This regression caused link and image references containing
raw tex not to parse correctly.

Added test.

Closes #2150.
2015-05-13 10:16:06 -07:00
gohai
8af168a7fe Fix image URIs in ICML output (v2)
InDesign expects LinkResourceURI to start with "file:" for local filenames, and won't render/link the image without.
2015-05-11 15:49:36 +02:00
John MacFarlane
7979db0f77 Test updates for 15d16e8456. 2015-05-04 10:05:11 -07:00
John MacFarlane
64b1394fe2 Make sure a closing </div> doesn't get included in a defn list item.
Closes #2127.
2015-05-03 15:06:40 -07:00
John MacFarlane
8245d672bd Fixed tests for change to latex template. 2015-05-02 10:16:26 -07:00
John MacFarlane
d9d88e58e1 Fixed regression with lists inside defintiion lists.
This fixes a regression (not in any released version) on
things like

    hi
    :   - there

Closes #2098.
2015-04-26 11:27:47 -07:00
John MacFarlane
095b05e4f9 EPUB tests: don't use joinPath, which varies across platforms.
Instead, use a forward-slash to join paths, regardless of the
platform. This matches the way MediaBag now works.

See
56e4ecab20 (commitcomment-10858449)
2015-04-22 17:38:59 -07:00
Nikolay Yakimov
c1ff165154 MD Reader: Tests for links/footnotes after citations
In-text citation suffix clashes with links and footnotes
2015-04-20 01:31:45 +03:00
John MacFarlane
343b6051da Added test case for #2062. 2015-04-18 19:00:18 -07:00
John MacFarlane
d20152e011 Markdown writer: improved escaping.
`<` should not be escaped as `\<`, for compatibility with
original Markdown.  We now escape `<` and `>` with entities.
Also, we now backslash-escape square brackets.

Closes #2086.
2015-04-18 10:58:50 -07:00
John MacFarlane
d3544dc6f7 Markdown definition lists: don't require indent for first line.
Previously the body of the definition (after the `:` or `~` marker)
needed to be in column 4.  This commit relaxes that requirement,
to better match the behavior of PHP Markdown Extra.  So, now
this is a valid definition list:

    foo
    : bar

This patch also helps resolve a potentially ambiguity with table
captions:

    foo

      : bar

      -----
      table
      -----

Is "bar" a definition, or the caption for the table?  We'll count
it as a caption for the table.

Closes #2087.
2015-04-18 10:13:32 -07:00
John MacFarlane
10e28ef750 More principled fix for #1820.
If the tag parses as a comment, we check to see if the
input starts with `<!--`. If not, it's bogus comment mode
and we fail htmlTag.

Includes test case.  Closes #1820.
2015-04-17 22:56:33 -07:00
John MacFarlane
764f677530 Merge branch 'latex-tightlist' of https://github.com/jlduran/pandoc into jlduran-latex-tightlist
Conflicts:
	data/templates
2015-04-17 19:23:13 -07:00