Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Make the code in `runStyleToTransform` a bit more consistent.
|
|
|
|
It makes more sense not to interpret -- otherwise using the original
document as the reference-doc would produce two of everything: the
interpreted version and the uninterpreted style version.
|
|
Now verse marked up with ">" (in contrast to <verse> tag) can be placed
inside lists.
|
|
Previously Emph, Strong, etc were outside the custom-style span. This
moves them inside in order to make it easier to write filters that act
on the formatting in these contents.
Tests and MANUAL example are changed to match.
|
|
The previous commit had a bug where custom-style spans would be read
with every recurrsion. This fixes that, and changes the example given
in the manual.
|
|
This will read all paragraph and character classes as divs and spans,
respectively. Dependent styles will still be resolved, but will be
wrapped with appropriate style tags. It is controlled by the `+styles`
extension (`-f docx+styles`).
This can be used in conjunction with the `custom-style` feature in the
docx writer for a pandoc-docx editing workflow. Users can convert from
an input docx, reading the custom-styles, and then use that same input
docx file as a reference-doc for producing an output docx file. Styles
will be maintained across the conversion, even if pandoc doesn't
understand them.
Without the extension:
$ pandoc test/docx/custom-style-reference.docx -f docx -t markdown
This is some text.
This is text with an *emphasized* text style. And this is text with a
**strengthened** text style.
> Here is a styled paragraph that inherits from Block Text.
With the extension:
$ pandoc test/docx/custom-style-reference.docx -f docx+styles -t markdown
::: {custom-style="FirstParagraph"}
This is some text.
:::
::: {custom-style="BodyText"}
This is text with an
*[[emphasized]{custom-style="Emphatic"}]{custom-style="Emphatic"}* text
style. And this is text with a
**[[strengthened]{custom-style="Strengthened"}]{custom-style="Strengthened"}**
text style.
:::
::: {custom-style="MyBlockStyle"}
Closes: #1843
|
|
The characters allowed before and after emphasis can be configured via
`#+pandoc-emphasis-pre` and `#+pandoc-emphasis-post`, respectively. This
allows to change which strings are recognized as emphasized text on a
per-document or even per-paragraph basis. The allowed characters must be
given as (Haskell) string.
#+pandoc-emphasis-pre: "-\t ('\"{"
#+pandoc-emphasis-post: "-\t\n .,:!?;'\")}["
If the argument cannot be read as a string, the default value is
restored.
Closes: #4378
|
|
|
|
lambda variable `st` shadowed an existing variable.
|
|
|
|
|
|
|
|
This is to make sure "i." starts a roman numbered list,
instead of a list with letter "i" (followed by "j", "k", ...").
|
|
This change is intended to preserve as much of the table content as
possible
Closes #4360
|
|
This fixes bugs introduced in commit 4bfab8f04c105f111d8d4e1c3ed7f7b5c75dbd19.
|
|
|
|
|
|
|
|
|
|
Lists are parsed in linear instead of exponential time now.
Contents of block tags, such as <quote>, is parsed directly,
without storing it in a string and parsing with parseFromString.
Fixed a bug: headers did not terminate lists.
|
|
|
|
Muse allows indentation to indicate quotation or alignment,
but only on the top level, not within a <quote> or list.
This patch also simplifies the code by removing museInQuote
and museInList fields from the state structure.
Headers and indented paragraphs are attempted to be parsed
only at the topmost level, instead of aborting parsing with guards.
|
|
|
|
|
|
|
|
|
|
Blocks following paragraphs are parsed only once at the top level.
Lists still take exponential time to parse, but this time is not
doubled anymore when this list terminates paragraph.
|
|
paraUntil does not discard the result of the following block parsing.
This change is a part of Muse reader refactoring to avoid reparsing.
|
|
Removed lookAhead from blankline, so it is consumed.
|
|
Block parsers must always stop after newline or at the end of file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Newline after whitespace now results in softbreak
instead of space.
|
|
Blank lines are already handled by blockElements.
|
|
|
|
|
|
|
|
|
|
Closes #4281.
Previously we allowed "nonindent spaces" before the
opening and closing `:::`, but this interfered with
list parsing, so now we require the fences to be
flush with the margin of the containing block.
|
|
Blanklines are already consumed during block parsing,
there is no need to check for them specifically.
|
|
This was a regression in pandoc 2.0.
Closes #4280.
|
|
This fixes an import error in the last commit.
|