aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/MediaWiki.hs
AgeCommit message (Collapse)AuthorFilesLines
2017-01-19MediaWiki reader: improved handling of display math.John MacFarlane1-2/+3
Sometimes display math is indented with more than one colon. Previously we handled these cases badly, generating definition lists and missing the math. Closes #3362.
2017-01-05MediaWiki reader: Fix quotation mark parsing (#3336)tgkokk1-6/+3
Change MediaWiki reader's behavior when the smart option is parsed to match other readers' behavior. Fix #2012.
2016-10-02MediaWiki writer: transform filename with underscores in images.John MacFarlane1-1/+1
`foo bar.jpg` becomes `foo_bar.jpg`. This was already done for internal links, but it also needs to happen for images. Closes #3052.
2016-09-02Remove Compat.MonoidJesse Rosenthal1-1/+1
This was only necessary for GHC versions with base below 4.5 (i.e., ghc < 7.4).
2016-08-06Improved mediawiki reader's treatment of verbatim constructions.John MacFarlane1-7/+13
Previously these yielded strings of alternating Code and Space elements; we now incorporate the spaces into the Code. Emphasis etc. is still possible inside these. Closes #3055.
2016-08-06Fix for unquoted attribute values in mediawiki tables.John MacFarlane1-1/+1
Previously an unquoted attribute value in a table row could cause parsing problems. Fixes #3053 (well, proper rowspans and colspans aren't created, but that's a bigger limitation with the current Pandoc document model for tables).
2016-05-09Allow spaces before '!' in MediaWiki table headerroblabla1-1/+1
2016-01-22Changed type of Shared.uniqueIdent argument from [String] to Set String.John MacFarlane1-2/+3
This avoids performance problems in documents with many identically named headers. Closes #2671.
2016-01-02MediaWiki reader: interpret markup inside `<tt>`, `<code>`.John MacFarlane1-4/+6
Closes #2607.
2015-12-12Modified readers to emit SoftBreak when appropriate.John MacFarlane1-1/+2
2015-11-19Merge branch 'new-image-attributes' of https://github.com/mb21/pandoc into ↵John MacFarlane1-11/+19
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-09Restored Text.Pandoc.Compat.Monoid.John MacFarlane1-0/+1
Don't use custom prelude for latest ghc. This is a better approach to making 'stack ghci' and 'cabal repl' work. Instead of using NoImplicitPrelude, we only use the custom prelude for older ghc versions. The custom prelude presents a uniform API that matches the current base version's prelude. So, when developing (presumably with latest ghc), we don't use a custom prelude at all and hence have no trouble with ghci. The custom prelude no longer exports (<>): we now want to match the base 4.8 prelude behavior.
2015-11-09Revert "Use -XNoImplicitPrelude and 'import Prelude' explicitly."John MacFarlane1-1/+0
This reverts commit c423dbb5a34c2d1195020e0f0ca3aae883d0749b.
2015-11-08Use -XNoImplicitPrelude and 'import Prelude' explicitly.John MacFarlane1-0/+1
This is needed for ghci to work with pandoc, given that we now use a custom prelude. Closes #2503.
2015-10-14Use custom Prelude to avoid compiler warnings.John MacFarlane1-3/+1
- The (non-exported) prelude is in prelude/Prelude.hs. - It exports Monoid and Applicative, like base 4.8 prelude, but works with older base versions. - It exports (<>) for mappend. - It hides 'catch' on older base versions. This allows us to remove many imports of Data.Monoid and Control.Applicative, and remove Text.Pandoc.Compat.Monoid. It should allow us to use -Wall again for ghc 7.10.
2015-08-08MediaWiki reader: handle unquoted table attributes.John MacFarlane1-2/+2
Closes #2355.
2015-08-07Updated readers and writers for new image attribute parameter.John MacFarlane1-11/+19
(mb21)
2015-04-26Updated copyright notices to -2015. Closes #2111.John MacFarlane1-2/+2
2015-03-28Merge branch 'errortype' of https://github.com/mpickering/pandoc into ↵John MacFarlane1-5/+5
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-07MediaWiki writer: spaces to underscores in wikilink URL.John MacFarlane1-2/+8
This mimics MediaWiki itself. Closes #1982.
2015-02-18Change return type of Mediawiki readerMatthew Pickering1-5/+5
2014-08-06MediaWiki reader doesn't recognize german "Bild"Uli Köhler1-1/+2
2014-07-11Removed (>>~) functionMatthew Pickering1-1/+1
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-06-20MediaWiki reader: Tightened up template parsing.John MacFarlane1-0/+1
The opening "{{" must be followed by an alphanumeric or ':'. This prevents the exponential slowdown in #1033. Closes #1033.
2014-06-20MediaWiki reader: Support --trace.John MacFarlane1-1/+10
2014-05-09Update copyright notices for 2014, add missing noticesAlbert Krewinkel1-2/+2
2014-04-10MediaWiki reader: Handle table rows containing just an HTML comment.John MacFarlane1-1/+2
Closes #1230.
2014-04-01MediaWiki reader: Fixed bug in certain nested lists.John MacFarlane1-1/+2
The bug: If a level 2 list was followed by a level 1 list, the first item of the level 1 list would be lost. Closes #1213.
2014-03-25Parsing: Added HasMacros, simplified other typeclasses.John MacFarlane1-2/+2
Removed updateHeaderMap, setHeaderMap, getHeaderMap, updateIdentifierList, setIdentifierList, getIdentifierList.
2014-03-25API changes to HasReaderOptions, HasHeaderMap, HasIdentifierList.John MacFarlane1-8/+8
Previously these were typeclasses of monads. They've been changed to be typeclasses of states. This ismplifies the instance definitions and provides more flexibility. This is an API change! However, it should be backwards compatible unless you're defining instances of HasReaderOptions, HasHeaderMap, or HasIdentifierList. The old getOption function should work as before (albeit with a more general type). The function askReaderOption has been removed. extractReaderOptions has been added. getOption has been given a default definition. In HasHeaderMap, extractHeaderMap and updateHeaderMap have been added. Default definitions have been given for getHeaderMap, putHeaderMap, and modifyHeaderMap. In HasIdentifierList, extractIdentifierList and updateIdentifierList have been added. Default definitions have been given for getIdentifierList, putIdentifierList, and modifyIdentifierList. The ultimate goal here is to allow different parsers to use their own, tailored parser states (instead of ParserState) while still using shared functions.
2014-03-24Merge pull request #1068 from jaimeMF/mw-images-langsJohn MacFarlane1-1/+5
MediaWiki reader: Accept image links in more languages
2014-01-22Fixed mediawiki ordered list parsing.John MacFarlane1-10/+15
Closes #1122.
2013-12-19HLint: use fromMaybeHenry de Valence1-3/+4
Replace uses of `maybe x id` with `fromMaybe x`.
2013-11-24MediaWiki reader: Accept image links in more languagesJaime Marquínez Ferrándiz1-1/+5
In some of the Wikipedia versions the local version of 'File' is used (for example 'Archivo' in Spanish)
2013-11-17MediaWiki reader: Add automatic header identifiers.John MacFarlane1-2/+20
2013-10-18MediaWiki reader: Trim contents of `<math>` tags.John MacFarlane1-5/+5
Otherwise we get problems when converting to markdown. Closes #1027.
2013-09-11Mediawiki: Parse an image + caption in a para by itself as a figure.John MacFarlane1-2/+2
2013-09-07MedaWiki reader: Implement some mathjax extensions.John MacFarlane1-4/+15
* `:<math>` for display math * `\(..\)` for inline math * `\[..\]` for display math We omit the `$` forms as the heuristics are harder.
2013-09-06MediaWiki reader: Allow Image: for images.John MacFarlane1-1/+1
Closes #971.
2013-08-10Use walk, walkM in place of bottomUp, bottomUpM when possible.John MacFarlane1-2/+2
They are significantly faster.
2013-05-20MediaWiki reader: Ignore attributes on headers.John MacFarlane1-4/+3
2013-05-20MediaWiki reader: Skip attributes on table rows.John MacFarlane1-1/+2
Previously we just crashed if rows had attributes, now we ignore them.
2013-03-28Mediawiki reader: Fixed | links inside table cells.John MacFarlane1-10/+8
Improved attribute parsing.
2013-03-28Mediawiki reader: Fixed last commit.John MacFarlane1-1/+1
2013-03-28MediaWiki reader: Correctly handle indented preformatted textJohn MacFarlane1-5/+17
without preceding or following blank line.
2013-03-27mediawiki reader: allow space before table rows.John MacFarlane1-4/+5
2013-01-27Mediawiki reader: Don't require blanklines after tables.Jeff Runningen1-1/+1
2013-01-25Use anyLine everywhere instead of 'manyTill anyChar newline'.John MacFarlane1-3/+3
2013-01-06Mediawiki reader: interpret HTML in verbatim contexts as text.John MacFarlane1-2/+1
Thanks to Jeff Runningen for reporting that mediawiki works this way.
2012-09-15MediaWiki reader: Allow table in table cell.John MacFarlane1-1/+3