aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-10-17Fix compiler warning.issue8382John MacFarlane
2022-10-17T.P.Error: Remove PandocParsecError constructor from PandocError.John MacFarlane
T.P.Parsing now exports `fromParsecError`, which can be used to turn a parsec ParseError into a regular PandocParseError (the appearance to the user should be unchanged in every case). [API change] Closes #8382.
2022-10-17Adjust tests for CSS change; add CSS comments to mark...John MacFarlane
highlighting CSS and citations CSS in the source.
2022-10-17Fix typo introduced by recent commit in styles.html.John MacFarlane
2022-10-17MediaWiki writer: avoid extra section divs with repeated ids.John MacFarlane
Closes #8383. Previously when converting HTML with headings nested under section elements, pandoc would produce HTML div tags and a span with an identifier duplicating the one on the div. It seems better just to omit the superstructure of section divs, so that's what this commit does, yielding more normal MediaWiki output.
2022-10-17Use styles.citations.html partial in styles.html.John MacFarlane
2022-10-17EPUB CSS changes.John MacFarlane
With this change, we reduce the amount of inline CSS used for EPUBs. Almost everything is now in the default EPUB CSS (`data/epub.css`), which can be overridden either by putting `epub.css` in the user data directory or by using `--css` on the command line. Inline styles are only used for syntax highlighting (which depends on the style specified, and is only included on pages with highlighted code) and for bibliography formatting (which can depend on the CSL style, and is only used in the page containing the bibliography). Note that, for compatibility with older readers, we don't use flexbox to style `column/columns` divs by default, as we do in HTML. Instead, we use an older method which only works when there are two `column` divs inside a `columns` div. If you need more than two columns and aren't worried about support for older EPUB readers, you can modify the default CSS (there is a comment in the CSS telling you what to do). Closes #8379.
2022-10-17MANUAL: Clarify that `--css` should be used with `-s`.John MacFarlane
2022-10-16T.P.Readers.VimWiki: avoid direct import of parsec.John MacFarlane
2022-10-16T.P.Parsing: export errorMessages, messageString.John MacFarlane
[API change]
2022-10-16T.P.Parsing: Remove gratuitious renaming of Parsec types.John MacFarlane
We were exporting Parser, ParserT as synonyms of Parsec, ParsecT. There is no good reason for this and it can cause confusion. Also, when possible, we replace imports of Text.Parsec with T.P.Parsing. The idea is to make it easier, at some point, to switch to megaparsec or another parsing engine if we want to. T.P.Parsing new exports: Stream(..), updatePosString, SourceName, Parsec, ParsecT [API change]. Removed exports: Parser, ParserT [API change].
2022-10-16Makefile: add ghcid targetJohn MacFarlane
2022-10-16RST writer: improve inline escaping rules.John MacFarlane
Also a small performance optimization. Closes #8380.
2022-10-16Makefile: fix .PHONY for test and build.John MacFarlane
2022-10-16MANUAL: fix reference link in section "pandoc-lua"Albert Krewinkel
2022-10-16Lua: fix rendering of Lua errors in LuaAlbert Krewinkel
Otherwise the `Error running Lua` message can be prepended multiple times.
2022-10-16Makefile: hide command output for `make binpath`.John MacFarlane
This allows: alias pandoc=`make binpath` for convenient local testing of a build.
2022-10-16'make help': add environment variables and default values.John MacFarlane
2022-10-16Makefile changes.John MacFarlane
Rename quick-cabal -> all, quick-test -> test. Add binpath target.
2022-10-16Lua: fix peeker for PandocError.Albert Krewinkel
String error messages were incorrectly popped of the stack when retrieving a PandocError.
2022-10-15Use skylighting 0.13.1.John MacFarlane
2022-10-15Minor code cleanups.John MacFarlane
2022-10-14Update changelog.John MacFarlane
2022-10-14changelog: remove reverted change.Albert Krewinkel
The change in template handling was reverted via #8372.
2022-10-14Lua: Support built-in default templates for custom writersAlbert Krewinkel
Custom writers can define a default template via a global `Template` function; the data directory is no longer searched for a default template. Writer authors can restore the old lookup behavior with ``` lua Template = function () local template return template.compile(template.default(PANDOC_SCRIPT_FILE)) end ```
2022-10-14doc/custom-writers.md: fix formattingAlbert Krewinkel
2022-10-14doc/custom-writers.md: Rephrase paragraph on format extensions (#8375)Ilona
2022-10-13CI: make sure we catch benchmark build failure.John MacFarlane
2022-10-13Extensions: simpler implementation based on Set.John MacFarlane
This implementation would allow us (if we wanted) to add an extensible Ext_custom Text constructor.
2022-10-13Got benchmarks compiling with new API.John MacFarlane
2022-10-13FlavoredFormat: add Show, Semigroup, Monad instancesJohn MacFarlane
2022-10-14Changelog: fix some typos, attributionAlbert Krewinkel
2022-10-13Update changelog.John MacFarlane
2022-10-13Rollback parameterize options on scripting engine.John MacFarlane
Rolls back 0ab014ed1e5890e338792fab98aecc45cd889f99. We don't need this because we aren't needing to print the Lua version in options any more; we're handling `--version` now at the pandoc-cli level.
2022-10-12Lua: add function `pandoc.template.meta_to_context`.Albert Krewinkel
The functions converts Meta values to template contexts; the intended use is in combination with `pandoc.template.apply`.
2022-10-12Lua: support extensions in custom readers.Albert Krewinkel
Like custom readers, like writers, can define the set of supported extensions by setting a global. E.g.: ``` lua reader_extensions = { smart = true, citations = false, } ```
2022-10-12Lua: allow Doc values in `WriterOptions.variables`.Albert Krewinkel
The specialized peeker and pusher function for `Context Text` values does not go via JSON, and thus keeps Doc values unchanged during round-tripping.
2022-10-11Lua: add function `pandoc.template.apply`Albert Krewinkel
The new function applies a context, containing variable assignments, to a template.
2022-10-11Templates: use filename to search for default template of custom writersAlbert Krewinkel
The default template of a custom writer `/path/to/my-writer.lua` is expected in the `templates/default.my-writer.lua` data file. Note that templates are *not* applied automatically to the output of custom writers; custom writer authors must ensure that the template is applied if one is present in the writer options. Closes: #8137
2022-10-11Templates: do not try to normalize input to `getDefaultTemplate`Albert Krewinkel
The function `getDefaultTemplate` no longer splits off extension modifers from the given format, as that conflicts with using custom writers as formats. Haskell library users should use `getDefaultTemplate <=< (fmap formatName . parseFlavoredFormat)` if the input format can still contain extensions. The same is true for `compileDefaultTemplate`, which calls `getDefaultTemplate` internally.
2022-10-10Simplify some citation code in LaTeX writer.John MacFarlane
2022-10-10Lua: support extensions in custom writersAlbert Krewinkel
Custom writers can define the extensions that they support via the global `writer_extensions`. The variable's value must be a table with all supported extensions as keys, and their default status as values. E.g., the below specifies that the writer support the extensions `smart` and `sourcepos`, but only the `smart` extension is enabled by default: writer_extensions = { smart = true, sourcepos = false, }
2022-10-10MANUAL.txt: add note about MathJax fonts to `--embed-resources`.John MacFarlane
2022-10-10doc/libraries.md: add hslua-cli and the hslua-module-* packagesAlbert Krewinkel
2022-10-10Org reader: make #+pandoc-emphasis-pre work as expected. (#8360)Amir Dekel
So far, `orgStateLastPreCharPos` wasn't updated appropriately after each parsing to native Str (by the parser `str`). In addition to solving this, the guard `notAfterString` in `emphasisStart` is removed to allow emphasis after Str at the first place.
2022-10-10doc/lua-filters.md: deprecate PANDOC_WRITER_OPTIONS in custom writersAlbert Krewinkel
2022-10-10Lua: support custom bytestring readers.Albert Krewinkel
2022-10-10Remove redundant import from T.P.ScriptingAlbert Krewinkel
2022-10-10Lua: use `Reader` type for custom readers.Albert Krewinkel
2022-10-09HTML writer; Properly merge classes for headings of level > 6.John MacFarlane
Previously we got two separate `class` attributes in the `p` tag. Closes #8363.