summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/MediaWiki.hs
Commit message (Collapse)AuthorAge
* Update copyright notices to include 2018Albert Krewinkel2018-01-05
|
* MediaWiki reader: hlintAlexander Krotov2017-11-11
|
* Automatic reformating by stylish-haskell.John MacFarlane2017-10-27
|
* Move CR filtering from tabFilter to the readers.John MacFarlane2017-06-20
| | | | | | | | | | The readers previously assumed that CRs had been filtered from the input. Now we strip the CRs in the readers themselves, before parsing. (The point of this is just to simplify the parsers.) Shared now exports a new function `crFilter`. [API change] And `tabFilter` no longer filters CRs.
* Separated tracing from logging.John MacFarlane2017-06-19
| | | | | | | | | | | Formerly tracing was just log messages with a DEBUG log level. We now make these things independent. Tracing can be turned on or off in PandocMonad using `setTrace`; it is independent of logging. * Removed `DEBUG` from `Verbosity`. * Removed `ParserTrace` from `LogMessage`. * Added `trace`, `setTrace` to `PandocMonad`.
* Changed all readers to take Text instead of String.John MacFarlane2017-06-10
| | | | | | | | Readers: Renamed StringReader -> TextReader. Updated tests. API change.
* MediaWiki reader: don't do curly quotes inside `<tt>` contexts.John MacFarlane2017-05-25
| | | | | | Even if `+smart`. See #3585.
* MediaWiki reader: Make smart double quotes depend on `smart` extension.John MacFarlane2017-05-25
| | | | Closes #3585.
* Update dates in copyright noticesAlbert Krewinkel2017-05-13
| | | | | This follows the suggestions given by the FSF for GPL licensed software. <https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html>
* Issue warning for duplicate header identifiers.John MacFarlane2017-03-12
| | | | | | | | | | | | | | | As noted in the previous commit, an autogenerated identifier may still coincide with an explicit identifier that is given for a header later in the document, or with an identifier on a div, span, link, or image. This commit adds a warning in this case, so users can supply an explicit identifier. * Added `DuplicateIdentifier` to LogMessage. * Modified HTML, Org, MediaWiki readers so their custom state type is an instance of HasLogMessages. This is necessary for `registerHeader` to issue warnings. See #1745.
* Stylish-haskell automatic formatting changes.John MacFarlane2017-03-04
|
* MediaWiki reader: ensure that list starts begin at left margin.John MacFarlane2017-02-21
| | | | | | Including when they're in tables or other list items. Closes #2606.
* MediaWiki reader: fixed more table issues.John MacFarlane2017-02-21
| | | | Closes #2649.
* MediaWiki reader: Allow blank line after table start.John MacFarlane2017-02-21
| | | | See #2649.
* MediaWiki tables: allow extra hyphens after `|-` in tables.John MacFarlane2017-02-21
| | | | | | | I didn't see this documented anywhere, but it seems to be allowed (and common). See #2649. This addresses some of the cases there, but not all.
* Use new warnings throughout the code base.John MacFarlane2017-02-11
|
* Added Text.Pandoc.Logging (exported module).John MacFarlane2017-02-10
| | | | | | | | | | | | This now contains the Verbosity definition previously in Options, as well as a new LogMessage datatype that will eventually be used instead of raw strings for warnings. This will enable us, among other things, to provide machine-readable warnings if desired. See #3392.
* More logging-related changes.John MacFarlane2017-01-25
| | | | | | | | | | | | | | | | | | Class: * Removed getWarnings, withWarningsToStderr * Added report * Added logOutput to PandocMonad * Make logOutput streaming in PandocIO monad * Properly reverse getLog output Readers: * Replaced use of trace with report DEBUG. TWiki Reader: Put everything inside PandocMonad m. API changes.
* Changes to verbosity in writer and reader options.John MacFarlane2017-01-25
| | | | | | | | | | | | | | API changes: Text.Pandoc.Options: * Added Verbosity. * Added writerVerbosity. * Added readerVerbosity. * Removed writerVerbose. * Removed readerTrace. pandoc CLI: The `--trace` option sets verbosity to DEBUG; the `--quiet` option sets it to ERROR, and the `--verbose` option sets it to INFO. The default is WARNING.
* Readers: pass errors straight up to PandocMonad.Jesse Rosenthal2017-01-25
| | | | | Since we've unified error types, we can just throw the same error at the toplevel.
* Unify Errors.Jesse Rosenthal2017-01-25
|
* Working on readers.Jesse Rosenthal2017-01-25
|
* MediaWiki reader: improved handling of display math.John MacFarlane2017-01-19
| | | | | | | | 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.
* MediaWiki reader: Fix quotation mark parsing (#3336)tgkokk2017-01-05
| | | | | | Change MediaWiki reader's behavior when the smart option is parsed to match other readers' behavior. Fix #2012.
* MediaWiki writer: transform filename with underscores in images.John MacFarlane2016-10-02
| | | | | | | `foo bar.jpg` becomes `foo_bar.jpg`. This was already done for internal links, but it also needs to happen for images. Closes #3052.
* Remove Compat.MonoidJesse Rosenthal2016-09-02
| | | | | This was only necessary for GHC versions with base below 4.5 (i.e., ghc < 7.4).
* Improved mediawiki reader's treatment of verbatim constructions.John MacFarlane2016-08-06
| | | | | | | | 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.
* Fix for unquoted attribute values in mediawiki tables.John MacFarlane2016-08-06
| | | | | | | | | 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).
* Allow spaces before '!' in MediaWiki table headerroblabla2016-05-09
|
* Changed type of Shared.uniqueIdent argument from [String] to Set String.John MacFarlane2016-01-22
| | | | | | | This avoids performance problems in documents with many identically named headers. Closes #2671.
* MediaWiki reader: interpret markup inside `<tt>`, `<code>`.John MacFarlane2016-01-02
| | | | Closes #2607.
* Modified readers to emit SoftBreak when appropriate.John MacFarlane2015-12-12
|
* Merge branch 'new-image-attributes' of https://github.com/mb21/pandoc into ↵John MacFarlane2015-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.
| * Updated readers and writers for new image attribute parameter.John MacFarlane2015-08-07
| | | | | | | | (mb21)
* | Restored Text.Pandoc.Compat.Monoid.John MacFarlane2015-11-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Revert "Use -XNoImplicitPrelude and 'import Prelude' explicitly."John MacFarlane2015-11-09
| | | | | | | | This reverts commit c423dbb5a34c2d1195020e0f0ca3aae883d0749b.
* | Use -XNoImplicitPrelude and 'import Prelude' explicitly.John MacFarlane2015-11-08
| | | | | | | | | | | | | | This is needed for ghci to work with pandoc, given that we now use a custom prelude. Closes #2503.
* | Use custom Prelude to avoid compiler warnings.John MacFarlane2015-10-14
| | | | | | | | | | | | | | | | | | | | | | | | | | - 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.
* | MediaWiki reader: handle unquoted table attributes.John MacFarlane2015-08-08
|/ | | | Closes #2355.
* Updated copyright notices to -2015. Closes #2111.John MacFarlane2015-04-26
|
* Merge branch 'errortype' of https://github.com/mpickering/pandoc into ↵John MacFarlane2015-03-28
|\ | | | | | | | | | | | | | | | | | | | | 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
| * Change return type of Mediawiki readerMatthew Pickering2015-02-18
| |
* | MediaWiki writer: spaces to underscores in wikilink URL.John MacFarlane2015-03-07
|/ | | | This mimics MediaWiki itself. Closes #1982.
* MediaWiki reader doesn't recognize german "Bild"Uli Köhler2014-08-06
|
* Removed (>>~) functionMatthew Pickering2014-07-11
| | | | | | 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.
* MediaWiki reader: Tightened up template parsing.John MacFarlane2014-06-20
| | | | | | The opening "{{" must be followed by an alphanumeric or ':'. This prevents the exponential slowdown in #1033. Closes #1033.
* MediaWiki reader: Support --trace.John MacFarlane2014-06-20
|
* Update copyright notices for 2014, add missing noticesAlbert Krewinkel2014-05-09
|
* MediaWiki reader: Handle table rows containing just an HTML comment.John MacFarlane2014-04-10
| | | | Closes #1230.
* MediaWiki reader: Fixed bug in certain nested lists.John MacFarlane2014-04-01
| | | | | | | 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.