aboutsummaryrefslogtreecommitdiff
path: root/src/Text
AgeCommit message (Collapse)Author
2021-03-13Use custom Prelude based on relude.reludeJohn MacFarlane
The Prelude now longer exports partial functions, so a large number of uses of these functions in the code base have been rewritten. A .ghci file has been added; this is necessary for ghci to work properly with the custom Prelude. Currently there are lots of compiler warnings. We should either fix these or go to using a custom Prelude that changes less than relude.
2021-03-13MediaWiki reader: Allow block-level content in notes (ref).John MacFarlane
Closes #7145.
2021-03-13Use integral values for w:tblW in docx.John MacFarlane
Cloess #7141.
2021-03-13Jira reader: mark divs created from panels with class "panel".Albert Krewinkel
Closes: tarleb/jira-wiki-markup#2
2021-03-13Jira writer: improve div/panel handlingAlbert Krewinkel
Include div attributes in panels, always render divs with class `panel` as panels, and avoid nesting of panels.
2021-03-12Citeproc: apply fixLinks correctly.John MacFarlane
This is code that incorporates a prefix like `https://doi.org/` into a following link when appropriate. But it didn't work because we were walking with a `[Inline] -> [Inline]` function on an `Inlines`. Changed the point of application of `fixLink` to resolve the issue. Closes #7130.
2021-03-12Simplify compactDL.John MacFarlane
2021-03-10HTML writer: Add warnings on duplicate attribute values.John MacFarlane
This prevents emitting invalid HTML. Ultimately it would be good to prevent this in the types themselves, but this is better for now. T.P.Logging: Add DuplicateAttribute constructor to LogMessage. [API change]
2021-03-09RST reader: fix logic for ending comments.John MacFarlane
Previously comments sometimes got extended too far. Closes #7134.
2021-03-09Org writer: fix operator precedence mistake in previous commitAlbert Krewinkel
2021-03-09Org writer: prevent unintended creation of ordered list itemsAlbert Krewinkel
Adjust line wrapping if default wrapping would cause a line to be read as an ordered list item. Fixes #7132
2021-03-08Jira writer: use noformat instead of code for unknown languages.Albert Krewinkel
Code blocks that are not marked as a language supported by Jira are rendered as preformatted text with `{noformat}` blocks. Fixes: tarleb/jira-wiki-markup#4
2021-03-07LaTeX reader: handle table cells containing `&` in `\verb`.John MacFarlane
Closes #7129.
2021-03-07LaTeX reader: support hyperref command.John MacFarlane
Closes #7127.
2021-03-06Allow `--resource-path` to accumulate.John MacFarlane
Previously, if `--resource-path` were used multiple times, the last resource path would replace the others. With this change, each time `--resource-path` is used, it prepends the specified path components to the existing resource path. Similarly, when `resource-path` is specified in a defaults file, the paths provided will be prepended to the existing resource path. This change also allows one to avoid using the OS-specific path separator; instead, one can simply use `--resource-path` a number of times with single paths. This form of command will not have an OS-dependent behavior. This change facilitates the use of multiple, small defaults files: each can specify a directory containing its own resources without clobbering the resource paths set by the others. Closes #6152.
2021-03-05Allow `${.}` in defaults files paths...John MacFarlane
to refer to the directory where the default file is. This will make it possible to create moveable "packages" of resources in a directory. Closes #5871.
2021-03-05Implement environment variable interpolation in defaults files.John MacFarlane
This allows the syntax `${HOME}` to be used, in fields that expect file paths only. Any environment variable may be interpolated in this way. A warning will be raised for undefined variables. The special variable `USERDATA` is automatically set to the user data directory in force when the defaults file is parsed. (Note: it may be different from the eventual user data directory, if the defaults file or further command line options change that.) Closes #5982. Closes #5977. Closes #6108 (path not taken).
2021-03-05Add fields for CSL optinos to Opt.John MacFarlane
* Add `optCSL`, `optBibliography`, `optCitationAbbreviations` to `Opt` [API change]. * Move `addMeta` from T.P.App.Opt to T.P.App.CommandLineOptions.
2021-03-05Logging: Add EnvironmentVariableUndefined constructor to LogMessage.John MacFarlane
[API change]
2021-03-05Shared: Change defaultUserDataDirs -> defaultUserDataDir.John MacFarlane
Rationale: the manual says that the XDG data directory will be used if it exists, otherwise the legacy data directory. So we should just determine this and use this directory, rather than having a search path which could cause some things to be taken from one data directory and others from others. [API change]
2021-03-04Revert "Revert "Relax `--abbreviations` rules so that a period isn't required.John MacFarlane
This reverts commit 916ce4d51121e0529b938fda71f37e947882abe5. I was confused in thinking it wouldn't work.
2021-03-04Revert "Relax `--abbreviations` rules so that a period isn't required."John MacFarlane
This reverts commit e461b7dd45f717f3317216c7d3207a1d24bf1c85. Ill-advised change. This doesn't work because we parse strings in chunks.
2021-03-04Relax `--abbreviations` rules so that a period isn't required.John MacFarlane
Partially addresses #7124.
2021-03-03Revert "Add T.P.Readers.LaTeX.Include."John MacFarlane
This reverts commit b569b0226d4bd5e0699077089d54fb03d4394b7d. Memory usage improvement in compilation wasn't very significant.
2021-03-03Add T.P.Readers.LaTeX.Include.John MacFarlane
2021-03-03Remove T.P.Readers.LaTeX.Accent.John MacFarlane
Incorporate accentCommands into T.P.Readers.LaTeX.Inline.
2021-03-03Move enquote commands to T.P.LaTeX.Lang.John MacFarlane
2021-03-03Moved more into T.P.Readers.LaTeX.Lang.John MacFarlane
2021-03-03Split out T.P.Readers.LaTeX.Inline.John MacFarlane
2021-03-02Split out T.P.Writers.LaTeX.Util.John MacFarlane
2021-03-02Split out T.P.Writers.LaTeX.Citation.John MacFarlane
2021-03-02Split out T.P.Writers.LaTeX.Lang.John MacFarlane
2021-03-02Split up T.P.Writers.Markdown...John MacFarlane
with T.P.Writers.Markdown.Types and T.P.Writers.Markdown.Inline. The module was difficult to compile on low-memory system.s
2021-03-01Make T.P.Readers.LaTeX.Types an unexported module.John MacFarlane
[API change] This is really an implementation detail that shouldn't be exposed in the public API.
2021-03-01Factor out T.P.Readers.LaTeX.Macro.John MacFarlane
2021-03-01Jira writer: use Span identifiers as anchorsAlbert Krewinkel
Closes: tarleb/jira-wiki-markup#3.
2021-02-28Removed unnecessary pragmas.John MacFarlane
2021-02-28Change T.P.Readers.LaTeX.SIunitx to export a command map...John MacFarlane
instead of individual commands.
2021-02-28T.P.Readers.LaTeX: Don't export tokenize, untokenize.John MacFarlane
[API change] These were only exported for testing, which seems the wrong thing to do. They don't belong in the public API and are not really usable as they are, without access to the Tok type which is not exported. Removed the tokenize/untokenize roundtrip test. We put a quickcheck property in the comments which may be used when this code is touched (if it is).
2021-02-28LaTeX writer: use function instead of map for accent lookup.John MacFarlane
2021-02-28Factor out T.P.Readers.LaTeX.Math.John MacFarlane
2021-02-28Fix bug in last commit.John MacFarlane
2021-02-28Markdown reader efficiency improvements.John MacFarlane
Benchmarks show that these make the reader 13-17% faster, depending on extensions.
2021-02-28LaTeX reader: another small efficiency improvement.John MacFarlane
2021-02-28LaTeX reader efficiency improvements.John MacFarlane
In conjunction with other changes this makes the reader almost twice as fast on our benchmark as it was on Feb. 10.
2021-02-28Move setDefaultLanguage to T.P.Readers.LaTeX.Lang.John MacFarlane
2021-02-28LaTeX reader: remove two unnecessary parsers in inline.John MacFarlane
These are handled anyway by regularSymbol.
2021-02-28Factor out T.P.Readers.LaTeX.Citation.John MacFarlane
2021-02-27Factor out T.P.Readers.LaTeX.Table.John MacFarlane
2021-02-27Split off T.P.Readers.LaTeX.Accent.John MacFarlane
To help reduce memory demands compiling the main LaTeX reader.