summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Highlighting.hs
AgeCommit message (Collapse)Author
2023-01-10Update copyright years, it's 2023!Albert Krewinkel
2022-12-18ConTeXt writer: support syntax highlighting for code.Albert Krewinkel
2022-09-27Fix small whitespace things.John MacFarlane
2022-08-26HTML writer: avoid aria-hidden in code blocks for HTML4.John MacFarlane
Closes #8241. This requires depending on a new (still unreleased) version of skylighting-format-blaze-html.
2022-08-14T.P.Highlighting: Export `lookupHighlightingStyle`.John MacFarlane
[API change] Previously this lived in an unexported module T.P.App.CommandLineOptions, under the name `lookupHighlightStyle`.
2022-01-02Copyright notices: update for 2022Albert Krewinkel
2021-04-25Writers: Recognize custom syntax definitions (#7241)Jan Tojnar
Languages defined using `--syntax-definition` were not recognized by `languagesByExtension`. This patch corrects that, allowing the writers to see all custom definitions. The LaTeX still uses the default syntax map, but that's okay in that context, since `--syntax-definition` won't create new listings styles.
2021-01-08Update copyright notices for 2021 (#7012)Albert Krewinkel
2020-03-15Use implicit Prelude (#6187)Albert Krewinkel
* Use implicit Prelude The previous behavior was introduced as a fix for #4464. It seems that this change alone did not fix the issue, and `stack ghci` and `cabal repl` only work with GHC 8.4.1 or newer, as no custom Prelude is loaded for these versions. Given this, it seems cleaner to revert to the implicit Prelude. * PandocMonad: remove outdated check for base version Only base versions 4.9 and later are supported, the check for `MIN_VERSION_base(4,8,0)` is therefore unnecessary. * Always use custom prelude Previously, the custom prelude was used only with older GHC versions, as a workaround for problems with ghci. The ghci problems are resolved by replacing package `base` with `base-noprelude`, allowing for consistent use of the custom prelude across all GHC versions.
2020-03-13Update copyright year (#6186)Albert Krewinkel
* Update copyright year * Copyright: add notes for Lua and Jira modules
2019-11-12Switch to new pandoc-types and use Text instead of String [API change].despresc
PR #5884. + Use pandoc-types 1.20 and texmath 0.12. + Text is now used instead of String, with a few exceptions. + In the MediaBag module, some of the types using Strings were switched to use FilePath instead (not Text). + In the Parsing module, new parsers `manyChar`, `many1Char`, `manyTillChar`, `many1TillChar`, `many1Till`, `manyUntil`, `mantyUntilChar` have been added: these are like their unsuffixed counterparts but pack some or all of their output. + `glob` in Text.Pandoc.Class still takes String since it seems to be intended as an interface to Glob, which uses strings. It seems to be used only once in the package, in the EPUB writer, so that is not hard to change.
2019-10-03Add additional listings languages.Wandmalfarbe
2019-04-03Add support for go with --listings.John MacFarlane
Closes #5427.
2019-03-01Remove license boilerplate.John MacFarlane
The haddock module header contains essentially the same information, so the boilerplate is redundant and just one more thing to get out of sync.
2019-02-04Add missing copyright notices and remove license boilerplate (#5112)Albert Krewinkel
Quite a few modules were missing copyright notices. This commit adds copyright notices everywhere via haddock module headers. The old license boilerplate comment is redundant with this and has been removed. Update copyright years to 2019. Closes #4592.
2018-06-05Add missing re-export of "breezeDark" style (#4687)Adrian Sieber
2018-03-18Use NoImplicitPrelude and explicitly import Prelude.John MacFarlane
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 Krewinkel
2017-11-02Support `lineAnchors` (or `line-anchors`) in code blocks, for HTML.John MacFarlane
2017-11-02Use latest skylighting; ensure no duplicate ids on code lines.John MacFarlane
The line identifiers are built using the code block's identifier as a prefix. If the code block has null identifier, we use "cb1", "cb2", etc. Closes #4031.
2017-10-27hlint suggestions.John MacFarlane
2017-06-02hlint suggestions.John MacFarlane
2017-05-13Update dates in copyright noticesAlbert Krewinkel
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-30Allow dynamic loading of syntax definitions.John MacFarlane
See #3334. * Add writerSyntaxMap to WriterOptions. * Highlighting: added parameter for SyntaxMap to highlight. * Implemented --syntax-definition option. TODO: [ ] Figure out whether we want to have the xml parsing depend on the dtd (it currently does, and fails unless the language.dtd is found in the same directory). [ ] Add an option to read a KDE syntax highlighting theme as a custom style. [ ] Add tests.
2017-03-13Highlighting: highlighting now returns an Either rather than Maybe.John MacFarlane
This allows us to display error information returned by the skylighting library. Display a warning if the highlighting library throws an error.
2017-03-04Stylish-haskell automatic formatting changes.John MacFarlane
2017-02-05Split pandoc.hs into a module, Text.Pandoc.App, and a small program.John MacFarlane
The App module provides a function that does a pandoc conversion, based on option settings. The program (pandoc.hs) now does nothing more than parse options and pass them to this function, which can easily be used by other applications (e.g. a GUI wrapper). The Opt structure has been further simplified. API changes: * New exposed module Text.Pandoc.App * Text.Pandoc.Highlighting has been exposed. * highlightingStyles has been moved to Text.Pandoc.Highlighting.
2017-01-29Removed unneeded imports.John MacFarlane
2017-01-25Update list of listings languages in Highlighting.John MacFarlane
This allows more languages to be used when using the `--listings` option. Closes #3374.
2016-12-23Updates to use skylighting rather than highlighting-kate.John MacFarlane
So far this just reproduces capacity. Later we'll be able to add features like warning messages, dynamic loading of xml syntax definitions, and dynamic loading of themes.
2016-03-22Updated copyright dates to include 2016.John MacFarlane
2016-01-24Make language extensions trigger highlighting.John MacFarlane
For example, `py` will now work as well as `python`. Closes jgm/highlighting-kate#83.
2015-12-03Add support to GAPRaniere Silva
2015-11-22hlint changesJohn MacFarlane
2015-11-09Revert "Use -XNoImplicitPrelude and 'import Prelude' explicitly."John MacFarlane
This reverts commit c423dbb5a34c2d1195020e0f0ca3aae883d0749b.
2015-11-08Use -XNoImplicitPrelude and 'import Prelude' explicitly.John MacFarlane
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 MacFarlane
2014-06-17Highlighting: Let .numberLines work even if no language given.John MacFarlane
Closes #1287, jgm/highlighting-kate#40.
2014-05-09Update copyright notices for 2014, add missing noticesAlbert Krewinkel
2013-03-05LaTeX reader: Handle language attribute for lstlistings.John MacFarlane
Convert it to a highlighting-kate language name.
2013-03-05Hide Text.Pandoc.Highlighting.John MacFarlane
* Moved code for translating listings language names to highlighting-kate names and back from LaTeX reader to Highlighting. * Text.Pandoc.Highlighting no longer exposed (API change) * Text.Pandoc.Highlighting exports toListingsLang, fromListingsLang
2012-08-09Use safeRead instead of using reads directly (various modules).John MacFarlane
2012-05-17Added 'zenburn' highlight style from highlighting-kate.John MacFarlane
Depend on h-k 0.5.0.6.
2012-01-25Depend on highlighting-kate 0.5.John MacFarlane
This uses styleToCss instead of styleToHtml.
2011-12-28Preserve attributes in highlighted HTML.John MacFarlane
The container element will have the classes, id, and key-value attributes you specified in the delimited code block. Previously these were stripped off.
2011-12-27Added `--highlight-style` and `--no-highlight` options.John MacFarlane
2011-12-27Highlighting: Add language as class name.John MacFarlane
This restores behavior of 1.8.2.1. Adjusted tests.
2011-12-26Updated highlighting for highlighting-kate 0.4.John MacFarlane
Text.Pandoc.Highlighting now exports just one new function, 'highlight', and reexports all the other functions from highlighting-kate that are used in the writers. This should make it easy to switch highlighting engines if that is ever desired.
2011-12-23LaTeX writer: Implemented syntax highlighting for CodeBlocks.John MacFarlane
2011-12-22Removed highlighting flag. Highlighting support is now standard.John MacFarlane