Commit graph

1121 commits

Author SHA1 Message Date
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
John MacFarlane
28ca8566ab Merge pull request #1954 from mcmtroffaes/feature/citekey-firstchar-alphanum
Allow digit as first character of a citation key.
2015-04-17 19:10:37 -07:00
John MacFarlane
44fcc5f96e Merge pull request #2079 from lierdakil/rst-normalize-headings
RST Writer: Normalize headings to sequential levels
2015-04-17 19:06:25 -07:00
John MacFarlane
fb143be038 Merge pull request #2092 from lierdakil/issue1909
MD Reader: Smart apostrophe after inline math
2015-04-17 18:55:35 -07:00
John MacFarlane
9ad336f586 LaTeX template: redefine \paragraph, \subparagraph...
to behave more like section headers.  Closes #1658.
2015-04-17 18:51:36 -07:00
Nikolay Yakimov
94e4a5ec44 MD Reader: Test for smart ' after inline math 2015-04-18 00:53:20 +03:00
Nikolay Yakimov
4b7ddeb63f RST Writer: Tests for rubrics and heading normalization 2015-04-16 19:27:33 +03:00
John MacFarlane
c5acaec3b5 LaTeX template: include grffile together with graphicx.
This properly handles filenames containing spaces and dots.
Closes #2074.
2015-04-13 09:00:55 -07:00
John MacFarlane
fee04fbee0 Merge pull request #2072 from lierdakil/latex-reader-cleanup
LaTeX Reader: Code cleanup
2015-04-12 21:39:08 -07:00
John MacFarlane
6a83773f03 OpenDocument template: use text:p instead of text:h for title.
Using `text:h` causes problems with numbering.  Closes #2059.
Thansk to @nkalvi for diagnosing this.
2015-04-12 21:29:53 -07:00
Nikolay Yakimov
251ce0738d LaTeX Reader: Test for ^^ character escapes 2015-04-13 03:22:39 +03:00
Nikolay Yakimov
66a8016bb3 ODT Writer: Figure captions - Tests update 2015-04-12 00:56:02 +03:00
John MacFarlane
28497d484e RST writer: better handling of raw latex inline.
We use `` :raw-latex:`...` `` and add a definition for this
role to the template.

Closes #1961.
2015-04-07 22:07:38 -07:00
Nikolay Yakimov
96438b11e0 Latex Reader: More tests for corner cases 2015-03-30 06:40:01 +03:00
Nikolay Yakimov
8981856aad Latex Reader: Test for para starting with latex macro 2015-03-30 06:17:24 +03:00
Nikolay Yakimov
f3e8274d04 LaTeX Reader: check for block-level newcommand aliases in blockCommand 2015-03-30 05:37:00 +03:00
John MacFarlane
2d2e4c9ab2 Merge branch 'master' of https://github.com/rootzlevel/pandoc into rootzlevel-master
Conflicts:
	src/Text/Pandoc/Readers/Org.hs
2015-03-28 21:09:38 -07:00
John MacFarlane
743b680649 Merge branch 'master' of github.com:jgm/pandoc 2015-03-28 13:10:32 -07:00
John MacFarlane
c6aaeb3c4f Fixed typo in lhs-test.html. 2015-03-28 13:02:59 -07:00
John MacFarlane
b74af6762d Merge branch 'mpickering-errortype' 2015-03-28 12:15:09 -07:00
John MacFarlane
6f4018f8d3 Fixed lhs writer tests (overflow-x, not x-overflow). 2015-03-28 12:13:27 -07:00
John MacFarlane
6a3a04c428 Merge branch 'errortype' of https://github.com/mpickering/pandoc into mpickering-errortype
Conflicts:
	benchmark/benchmark-pandoc.hs
	src/Text/Pandoc/Readers/Markdown.hs
	src/Text/Pandoc/Readers/Org.hs
	src/Text/Pandoc/Readers/RST.hs
	tests/Tests/Readers/LaTeX.hs
2015-03-28 12:12:48 -07:00
John MacFarlane
5f74db8605 Updated tests for new highlighting-kate behavior. 2015-03-28 10:10:33 -07:00
John MacFarlane
619b2e8ca2 Merge pull request #1968 from lierdakil/issue1607
Fixes for multiple docx writer style bugs.
2015-03-16 12:02:40 -07:00
John MacFarlane
fcf1cd2f31 AsciiDoc writer: avoid wrapping after list marker.
Closes #1858.
2015-03-15 15:43:05 -07:00
John MacFarlane
451019290b AsciiDoc writer: insert some needed blank lines.
Closes #1860.
2015-03-15 14:48:01 -07:00
John MacFarlane
0deb7c507d Merge pull request #1989 from zudov/shortcut_ref_link_pr
Support shortcut reference links in markdown writer
2015-03-15 11:58:30 -07:00
Konstantin Zudov
b9f77ed03d Support shortcut reference links in markdown writer
Issue #1977

Most markdown processors support the [shortcut format] for reference links.
Pandoc's markdown reader parsed this shortcuts unoptionally.
Pandoc's markdown writer (with --reference-links option) never shortcutted links.

This commit adds an extension `shortcut_reference_links`. The extension is
enabled by default for those markdown flavors that support reading shortcut
reference links, namely:

    - pandoc
    - strict pandoc
    - github flavoured
    - PHPmarkdown

If extension is enabled, reader parses the shortcuts in the same way as
it preveously did. Otherwise it would parse them as normal text.

If extension is enabled, writer outputs shortcut reference links unless
doing so would cause problems (see test cases in `tests/Tests/Writers/Markdown.hs`).
2015-03-10 20:32:24 +02:00
Craig S. Bosma
513221f822 Org reader: add support for smart punctuation 2015-03-09 07:11:53 -05:00