Age | Commit message (Collapse) | Author | Files | Lines |
|
* Use an infix operator normally instead of immediately applying an operator section
* Use M.fromList
|
|
|
|
All warnings are either fixed or, if more appropriate, HLint is
configured to ignore them. HLint suggestions remain.
* Ignore "Use camelCase" warnings in Lua and legacy code
* Fix or ignore remaining HLint warnings
* Remove redundant brackets
* Remove redundant `return`s
* Remove redundant as-pattern
* Fuse mapM_/map
* Use `.` to shorten code
* Remove redundant `fmap`
* Remove unused LANGUAGE pragmas
* Hoist `not` in Text.Pandoc.App
* Use fewer imports for `Text.DocTemplates`
* Remove redundant `do`s
* Remove redundant `$`s
* Jira reader: remove unnecessary parentheses
|
|
* Use concatMap instead of reimplementing it
* Replace an unnecessary multi-way if with a regular if
* Use sortOn instead of sortBy and comparing
* Use guards instead of lots of indents for if and else
* Remove redundant do blocks
* Extract common functions from both branches of maybe
Whenever both the Nothing and the Just branch of maybe do the same
function, do that function on the result of maybe instead.
* Use fmap instead of reimplementing it from maybe
* Use negative forms instead of negating the positive forms
* Use mapMaybe instead of mapping and then using catMaybes
* Use zipWith instead of mapping over the result of zip
* Use unwords instead of reimplementing it
* Use <$ instead of <$> and const
* Replace case of Bool with if and else
* Use find instead of listToMaybe and filter
* Use zipWithM instead of mapM and zip
* Inline lambda wrappers into the real functions
* We get zipWithM from Text.Pandoc.Writers.Shared
* Use maybe instead of fromMaybe and fmap
I'm not sure how this one slipped past me.
* Increase a bit of indentation
|
|
|
|
There's no need to use `catMaybes`, `uncurry`, `bool`, etc., just
to get elements where the second element of a tuple is True.
|
|
Closes #6114.
|
|
Data.Bool already provides a bool function identical to this one.
|
|
Closes #6110.
|
|
Anywhere "maybe" is used with "id" as its second argument, using
"fromMaybe" instead will simplify the code. Conversely, anywhere
"fromMaybe" is used with the result of "fmap" or "<$>" as its second
argument, using "maybe" instead will simplify the code.
|
|
There's currently `unless`, `not`, and `notParaOrPlain` in the same
expression, which is a rather confusing triple negative. Replace
`notParaOrPlain` with `paraOrPlain` and switch to `all` from `any`
to clean this up.
|
|
|
|
|
|
This adds csv as an input format.
The CSV table is converted into a pandoc simple table.
Closes #6100.
|
|
The intent of that commit was to parse unknown LaTeX
enivronments as verbatim if they can't be parsed normally,
avoiding crashes on environments that allow unescaped
underscores and the like. But the fix didn't completely
work: it worked for raw TeX in markdown but not when
reading LaTeX. This change fixes that.
See #6034. Closes #6093.
|
|
This affecs parsing of raw tex in LaTeX and in Markdown and
other formats.
Closes #6043.
|
|
If parsing fails in a raw environment (e.g. due to special
characters like unescaped `_`), try again as a verbatim
environment, which is less sensitive to special characters.
This allows us to capture special environments that change
catcodes as raw tex when `-f latex+raw_tex` is used.
Closes #6034.
|
|
Closes #6009, #5360.
|
|
|
|
Errors during parsing are now returned in full and no longer replaced by
a custom message.
|
|
Fixed a problem where words surrounded by colons could causing parse
failures in some cases when they occurred in headers.
Fixes: #5993
|
|
Closes: #5984
|
|
Closes #5556
|
|
|
|
The table `#+NAME:` or `#+LABEL:` is added to the table's caption in the
form of an empty span with the label set as the span's ID.
Closes: #5984
|
|
|
|
For YAML metadata parsing. A step in the direction of #5914.
No API change.
|
|
This was somehow missed in 884aef31c55e375cd62fcb55a71829d005087cae.
|
|
|
|
Fixes #5916
|
|
Add all titling commands to existing definition for `\dedication`.
|
|
|
|
This yields a small but measurable performance improvement.
|
|
|
|
|
|
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.
|
|
Superscripts and subscripts cannot contain spaces,
but newlines were previously allowed (unintentionally).
This led to bad interactions in some cases with footnotes.
E.g.
```
foo^[note]
bar^[note]
```
With this change newlines are also not allowed inside
super/subscripts.
Closes #5878.
|
|
(#5882)
* Add HTML Reader support for `<dfn>`, parsing this as a Span with class `dfn`.
* Change `htmlSpanLikeElements` implementation to retain classes,
attributes and inline content.
|
|
Closes #5885.
|
|
Previously, if a document contained two YAML metadata blocks
that set the same field, the conflict would be resolved in favor
of the first. Now it is resolved in favor of the second (due to
a change in pandoc-types).
This makes the behavior more uniform with other things in pandoc
(such as reference links and `--metadata-file`).
|
|
|
|
Closes #5799
|
|
The left-to-right direction setting in docx is used in the spec only
for overriding an explicit right-to-left setting. We only process it
when it happens in a paragraph set with BiDi.
This is especially important for docs exported from Google Docs, which
explicitly (and unnecessarily) set "rtl=0" for every paragraph.
Closes: #5723
|
|
The first list item of a sublist should not resume numbering
from the number of the last sublist item of the same level,
if that sublist was a sublist of a different list item.
That is, we should not get:
```
1. one
1. sub one
2. sub two
2. two
3. sub one
```
|
|
when resolving links to internal anchors ending with `_`.
Closes #5763.
|
|
...to ensure that space is left between a control seq and
a following word that would otherwise change its meaning.
Closes #5836.
|
|
Closes #5836.
|
|
These were formerly omitted (though they still affected macro
resolution if `latex_macros` was set). Now they are included in
the document.
|
|
when `latex_macros` is disabled. (When `latex_macros` is enabled,
we omit them, since pandoc is applying the macros itself.)
Previously, it was documented that the macro definitions got
passed through as raw latex regardless of whether `latex_macros`
was set -- but in fact they never got passed through.
|
|
We were using `grouped blocks` instead of `grouped block`.
This caused the reader to hang in an infinite loop
(with a memory leak) on e.g. `\parbox{1em}{#1}`.
Closes #5845.
|