Age | Commit message (Collapse) | Author | Files | Lines |
|
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.
|
|
* Set dbBook to true when traversing a chapter too.
Currently, a `<title/>` in a chapter and in a `<section/>` below that
chapter have the same level if they're not inside a `<book/>`.
This can happen in a multi-file book project. Also see the example at
https://tdg.docbook.org/tdg/4.5/chapter.html
Co-authored-by: Félix Baylac-Jacqué <felix@alternativebit.fr>
* Add docbook-chapter test
This tests nested `<section/>` and makes sure `<title/>` in the first
`<section/>` below `<chapter/>` is one level deeper than the `<chapter/>`'s
`<title/>`, also when not inside a `<book/>`.
Co-authored-by: Félix Baylac-Jacqué <felix@alternativebit.fr>
|
|
Comment lines in Org-mode can be completely empty; both of these line
should produce no output:
# a comment
#
The reader used to produce a wrong result for the latter, but ignores
that line as well now.
Fixes: #5856
|
|
* HTML reader: Handle cite attribute for quotes. If a `<q>` tag has a `cite` attribute, we interpret it as a Quoted element with an inner Span. Closes #5798
* Refactor url canonicalization into a helper function
* Modify HTML writer to handle quote with cite.
[0]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/q
|
|
This allows us to avoid retokenizing multiple times in
e.g. rawLaTeXBlock. (Unexported module, so not an API change.)
|
|
The `<samp>` element is parsed as a Span with class `sample`.
Closes #5792.
|
|
* Text.Pandoc.Shared: export `htmlSpanLikeElements` [API change]
This commit also introduces a mapping of HTML span like elements that
are internally represented as a Span with a single class, but that are
converted back to the original element by the html writer. As of now,
only the kbd element is handled this way. Ideally these elements should
be handled as plain AST values, but since that would be a breaking
change with a large impact, we revert to this stop-gap solution.
Fixes https://github.com/jgm/pandoc/issues/5796.
|
|
|
|
Fixes #5821
|