aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/XML.hs
AgeCommit message (Collapse)AuthorFilesLines
2018-12-04Strip out illegal XML characters in escapeXMLString.John MacFarlane1-1/+6
Closes #5119.
2018-11-22Hlint suggestions.John MacFarlane1-2/+1
2018-11-04XML: toHtml5Entities: prefer shorter entities...John MacFarlane1-3/+10
when there are several choices for a particular character.
2018-11-01Text.Pandoc.XML: add toHtml5Entities.John MacFarlane1-0/+18
[API change]
2018-03-18Use NoImplicitPrelude and explicitly import Prelude.John MacFarlane1-0/+2
This seems to be necessary if we are to use our custom Prelude with ghci. Closes #4464.
2018-01-05Update copyright notices to include 2018Albert Krewinkel1-2/+2
2017-06-11Switched Writer types to use Text.John MacFarlane1-5/+6
* XML.toEntities: changed type to Text -> Text. * Shared.tabFilter -- fixed so it strips out CRs as before. * Modified writers to take Text. * Updated tests, benchmarks, trypandoc. [API change] Closes #3731.
2017-05-13Update dates in copyright noticesAlbert Krewinkel1-2/+2
This follows the suggestions given by the FSF for GPL licensed software. <https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html>
2017-03-04Stylish-haskell automatic formatting changes.John MacFarlane1-9/+9
2016-09-02Remove TagSoup compatJesse Rosenthal1-2/+2
We already lower-bound tagsoup at 0.13.7, which means we were always running the compatibility layer (it was conditional on min value 0.13). Better to just use `lookupEntity` from the library directly, and convert a string to a char if need be.
2016-03-22Updated copyright dates to include 2016.John MacFarlane1-2/+2
2016-01-08Fixed shadowing warning.John MacFarlane1-1/+1
2016-01-08Work around tagsoup bug - not allowing uppercase x in hex entities.John MacFarlane1-0/+1
Issue submitted at tagsoup.
2016-01-08Entity handling fixes:John MacFarlane1-2/+6
- Text.Pandoc.XML.fromEntities: handle entities without a semicolon. Always lookup character references with the trailing ';', even if it wasn't present. And never add it when looking up numerical entities. (This is what tagsoup seems to require.) - Text.Pandoc.Parsing.characterReference: Always lookup character references with the trailing ';', and leave off the ';' when looking up numerical entities. This fixes a regression for e.g. `&lang;`.
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-04-26Updated copyright notices to -2015. Closes #2111.John MacFarlane1-2/+2
2014-05-09Update copyright notices for 2014, add missing noticesAlbert Krewinkel1-2/+2
2013-08-08Added Text.Pandoc.Compat.TagSoupEntity.John MacFarlane1-1/+1
This allows pandoc to compile with tagsoup 0.13.x. Thanks to Dirk Ullrich for the patch.
2013-06-24Use new flexible metadata type.John MacFarlane1-12/+1
* Depend on pandoc 1.12. * Added yaml dependency. * `Text.Pandoc.XML`: Removed `stripTags`. (API change.) * `Text.Pandoc.Shared`: Added `metaToJSON`. This will be used in writers to create a JSON object for use in the templates from the pandoc metadata. * Revised readers and writers to use the new Meta type. * `Text.Pandoc.Options`: Added `Ext_yaml_title_block`. * Markdown reader: Added support for YAML metadata block. Note that it must come at the beginning of the document. * `Text.Pandoc.Parsing.ParserState`: Replace `stateTitle`, `stateAuthors`, `stateDate` with `stateMeta`. * RST reader: Improved metadata. Treat initial field list as metadata when standalone specified. Previously ALL fields "title", "author", "date" in field lists were treated as metadata, even if not at the beginning. Use `subtitle` metadata field for subtitle. * `Text.Pandoc.Templates`: Export `renderTemplate'` that takes a string instead of a compiled template.. * OPML template: Use 'for' loop for authors. * Org template: '#+TITLE:' is inserted before the title. Previously the writer did this.
2013-03-19Added Text.Pandoc.Writers.OPML.John MacFarlane1-1/+8
TODO: * Document in README * Add tests * Add template (and add template to cabal file)
2012-04-14Fixed bug in fromEntities.John MacFarlane1-3/+3
The previous version would turn "hi & low you know;" into "hi &".
2012-02-05Fixed bug in fromEntities: require semicolon to process as entity.John MacFarlane1-1/+1
2012-02-05Text.Pandoc.XML: Export fromEntities.John MacFarlane1-1/+15
Remove old 'deEntities' from pandoc.hs.
2012-01-28XML: Added toEntities.John MacFarlane1-1/+10
2010-12-21XML: don't use breaking spaces in attribute lists.John MacFarlane1-4/+5
2010-12-21XML: Replaced escapeStringAsXML with a faster version.John MacFarlane1-9/+1
Benchmarked with criterion, it's about 8x faster than the old version. This speeds up docbook, opendocument, and html writers.
2010-03-23Updated copyright notices.John MacFarlane1-2/+2
2010-01-01XML: don't escape \160 (nonbreaking space) as an entity.fiddlosopher1-2/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1770 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-05Added stripTags to Text.Pandoc.XML.fiddlosopher1-1/+12
This is used in the HTML writer. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1647 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-01-24Moved all haskell source to src subdirectory.fiddlosopher1-0/+88
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1528 788f1e2b-df1e-0410-8736-df70ead52e1b