aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2014-07-20HTML reader: parse Div and Span elements even without `--parse-raw`.John MacFarlane1-2/+0
Closes #1434.
2014-07-20Fix behavior of `markdown_attribute` extension.John MacFarlane2-4/+17
It now works as in PHP markdown extra. Setting `markdown="1"` on an outer tag affects all contained tags until it is reversed with `markdown="0"`. Closes #1378. Added `stateMarkdownAttribute` to `ParserState`.
2014-07-20Markdown reader: Fixed small bug in HTML parsing with markdown_attribute.John MacFarlane1-3/+4
Test case: <aside markdown="1"> *hi* </aside> Previously gave: <article markdown="1"> <p><em>hi</em> </article></p>
2014-07-20Markdown reader: revised definition list syntax (closes #1429).John MacFarlane2-23/+40
* This change brings pandoc's definition list syntax into alignment with that used in PHP markdown extra and multimarkdown (with the exception that pandoc is more flexible about the definition markers, allowing tildes as well as colons). * Lazily wrapped definitions are now allowed; blank space is required between list items; and the space before definition is used to determine whether it is a paragraph or a "plain" element. * For backwards compatibility, a new extension, `compact_definition_lists`, has been added that restores the behavior of pandoc 1.12.x, allowing tight definition lists with no blank space between items, and disallowing lazy wrapping.
2014-07-20readWith: reverted generalization from f201bdcb.John MacFarlane1-8/+8
We need input to be a string so we can print the offending line on an error.
2014-07-20Org reader: text adjacent to a list yields a Plain, not Para.John MacFarlane1-3/+7
This gives better results for tight lists. Closes #1437. An alternative solution would be to use Para everywhere, and never Plain. I am not sufficiently familiar with org to know which is best. Thoughts, @tarleb?
2014-07-20AsciiDoc writer: Double markers in intraword emphasis.John MacFarlane1-11/+46
Closes #1441.
2014-07-19Renamed readTeXMath' to avoid name conflict with texmath 0.6.7Matthew Pickering9-26/+17
Also removed deprecated readTeXMath.
2014-07-17Org reader: Respect :exports header arguments on code blocksCraig S. Bosma1-5/+27
Adds support to the org reader for conditionally exporting either the code block, results block immediately following, both, or neither, depending on the value of the `:exports` header argument. If no such argument is supplied, the default org behavior (for most languages) of exporting code is used.
2014-07-16Remove unused import.John MacFarlane1-1/+0
2014-07-16Custom writers now work with `--template`.John MacFarlane1-2/+14
Removed HTML header scaffolding from data/sample.lua.
2014-07-16Made Citation information available in lua custom writer.John MacFarlane1-2/+17
2014-07-16Removed redundant clause in markdown parser.John MacFarlane1-2/+1
Thanks @dubiousjim. Close #1431.
2014-07-15Merge pull request #1430 from jkr/anchor-fix-2John MacFarlane1-27/+31
Fix auto identified headers when already auto-id'ed
2014-07-16Docx Reader: Fix hdr auto-id when already auto-id.Jesse Rosenthal1-11/+19
If header anchors (bookmarks in a header paragraph) already have an auto-id, which will happen if they're generated by pandoc, we don't want to rename it twice, and thus end up with an unnecessary number at the end. So we add a state value to check if we're in a header. If we are, we don't rename the bookmark -- wait until we rename it in our header handling.
2014-07-16Docx Reader: Change state handling.Jesse Rosenthal1-16/+12
We don't need `updateDState` -- the built-in `modify` works just fine. And we redefine `withDState` to use modify.
2014-07-15HTML writer: Removed useless clause.John MacFarlane1-4/+0
2014-07-15LaTeX writer: Use \nolinkurl in email autolinks.John MacFarlane1-2/+9
This allows them to be styled using `\urlstyle{tt}`. Thanks to Ulrike Fischer for the solution.
2014-07-15EPUB writer: Keep newlines between block elements.John MacFarlane1-1/+1
This allows easier diff-ability. Closes #1424.
2014-07-15Shared.fetchItem: unescape URI encoding before reading local file.John MacFarlane1-1/+1
Close #1427.
2014-07-13RTF writer: Avoid extra paragraph tags in metadata.John MacFarlane1-2/+10
Closes #1421.
2014-07-13Use raw HTML for complex block quotes.John MacFarlane1-1/+7
As far as I can see, dokuwiki markup is pretty limited in what can go in a `>` block quote: just a single line of paragraph text. (#1398)
2014-07-13DokuWiki writer: Use raw HTML for complex lists...John MacFarlane1-13/+40
as in the mediawiki writer. The dokuwiki markup isn't able to handle multiple block-level items within a list item, except in a few special cases (e.g. code blocks, and these must be started on the same line as the preceding paragraph). So we fall back to raw HTML for these. Perhaps there is a better solution. We can "fake" multiple paragraphs within list items using hard line breaks (`\\`), but we must keep everything on one line. (#1398)
2014-07-13DokuWiki writer: Normalize to collapse adjacent raw HTML blocks.John MacFarlane1-1/+1
2014-07-13DokuWiki writer: More tweaks to email links. (#1398)John MacFarlane1-4/+3
2014-07-13DokuWiki writer: Use pointy brackets for email links.John MacFarlane1-0/+2
(#1398)
2014-07-13Dokuwiki writer: More idiomatic code for escaping.John MacFarlane1-2/+4
2014-07-13DokuWiki writer: More raw HTML fixes. (#1398)John MacFarlane1-2/+4
* Use uppercase HTML tags for block-level content, lowercase for inline. * Newline before closing HTML tag.
2014-07-13DokuWiki writer: Fix raw inlines and blocks.John MacFarlane1-6/+6
* mediawiki > dokuwiki * ignore raw content other than html or dokuwiki. (#1398)
2014-07-13Markdown writer: Use span with style for SmallCaps. (#1360)John MacFarlane1-1/+8
2014-07-13Markdown writer: use Span instead of (hackish) SmallCaps in plainify.John MacFarlane1-9/+10
2014-07-13EPUB writer: Use stringify instead of custom plainify.John MacFarlane1-16/+10
As far as I can tell, it does about the same thing.
2014-07-13Better comment on removeFormatting.John MacFarlane1-1/+1
2014-07-13Shared: Generalized type of removeFormatting.John MacFarlane1-1/+1
2014-07-13Merge branch 'claremacrae-dokuwiki'.John MacFarlane1-2/+4
Use removeFormatting from Shared instead of the custom unfancy function.
2014-07-13Shared: Added removeFormatting.John MacFarlane1-0/+14
API change (addition of exported function).
2014-07-13Use renderTags' for all tag rendering.John MacFarlane3-5/+5
This properly handles tags that should be self-closing. Previously `<hr/>` would appear in EPUB output as `<hr></hr>`. Closes #1420.
2014-07-12Fixed typo in module header for Asciify.John MacFarlane1-1/+1
Thanks to @dubiousjim. Closes #1419.
2014-07-12Parsing: Simplified dash and ellipsis.John MacFarlane1-40/+13
This originated with @dubiousjim's observation in #1419 that there was a typo in the definition of enDash. It returned an em dash character instead of an en dash. I thought about why this had not been noticed before, and realized that en dashes were just being parsed as regular symbols. That made me realize that, now that we no longer have dedicate EnDash, EmDash, and Ellipses inline elements, as we used to in pandoc, we no longer need to parse the unicode characters specially. This allowed a considerable simplification of the code. Partially resolves #1419.
2014-07-12Removed space at ends of lines in source.John MacFarlane12-96/+96
2014-07-12Merge pull request #1414 from mpickering/generalJohn MacFarlane6-156/+191
Improvements to Parsing.hs
2014-07-12Merge pull request #1415 from jkr/nicertypeJohn MacFarlane3-751/+739
Nicer Docx type
2014-07-12Docx Reader: Add a compatibility layer for Except.Jesse Rosenthal2-3/+30
mtl switched from ErrorT to ExceptT, but we're not sure which mtl we'll be dealing with. This should make errors work with both. The main difference (beside the name of the module and the monad transformer) is that Except doesn't require an instance of an Error Typeclass. So we define that for compatability. When we switch to a later mtl, using Control.Monad.Exception, we can just erase the instance declaration, and all should work fine.
2014-07-12Docx Reader: A nicer Docx type.Jesse Rosenthal2-751/+712
This modifies the Docx type in the parser to avoid all the extra files (Notes, numbering, etc). A reader monad keeps track of these, and applies them at the end. The reader monad is stacked with ErrorT to enable better error-handling than the old Maybes. (Note that the better error handling isn't really there yet, but it is now possible.) One long-term goal of these changes is to make it easier to write the Docx type. This should make it easier to develop a standalone docx package in the future.
2014-07-11Markdown writer: don't use braced attributes for fenced code.John MacFarlane2-3/+2
Removed `Ext_fenced_code_attributes` from `markdown_github` extensions. If this extension is not set, the first class attribute will be printed after the opening fence as a bare word. Closes #1416.
2014-07-11Removed inline fmap from Parsing.hsMatthew Pickering1-8/+8
Replaced all inline occurences of fmap with the more idiomatic (<$>).
2014-07-11Removed (>>~) functionMatthew Pickering6-22/+17
This function is equivalent to the more general (<*) which is defined in Control.Applicative. This change makes pandoc code easier to understand for those not familar with the codebase.
2014-07-11Generalised all functions in Parsing.hsMatthew Pickering1-128/+168
Before it wasn't possible to use these general combinators with the ParsecT transformer but with the more general types this is now possible.
2014-07-10HTML writer: Deactivate "incremental" inside slide speaker notes.John MacFarlane1-3/+5
Closes #1394.
2014-07-10Fixed an issue caused by e4263d306e6988dd322c895242eb818d22b9e012.John MacFarlane1-0/+5
This sets `stateInHtmlBlock` to `Just "div"` when we're parsing an HTML div. Without this fix, a closing `</div>` tag could be parsed as part of a list item rather than after the list.