Age | Commit message (Collapse) | Author | Files | Lines |
|
Add support for \C'...' escapes.
|
|
|
|
The function `runLuaFilter` was only used in Text.Pandoc.Filter.Lua, use
apply from the that module instead.
|
|
Closes #5028.
|
|
|
|
This ensures that tables inside lists are parsed correctly.
|
|
pandoc follows Text::Amuse rules instead of being bug compatible with Emacs Muse
|
|
See https://github.com/melmothx/text-amuse/issues/44 for discussion on these rules
|
|
|
|
Closes #4982.
|
|
* Lua: allow access to pandoc state
Lua filters and custom writers now have read-only access to most fields
of pandoc's internal state via the global variable `PANDOC_STATE`.
* Lua: allow iterating through fields of PANDOC_STATE
* Lua filters doc: describe CommonState
* Lua filters doc: mention global variable PANDOC_STATE
* Lua: add access to logs
Log messages can currently only be printed, but not decomposed.
|
|
|
|
Because we use it as a delimiter for tables (in man)
and for math (in ms).
|
|
|
|
T.P.GroffChar: replaced `essentialEscapes` with `manEscapes`,
which includes all the escapes mentioned in the groff_man manual.
T.P.Writers.Groff: removed escapeCode; changed parameter on
escapeString from Bool to new type `EscapeMode`.
Rewrote `escapeString`.
|
|
Closes #4995.
|
|
- Improve escaping of accented characters with `--ascii`.
Combining accents are now handled properly.
- Don't escape spaces and tabs in code blocks. This doesn't
seem to be necessary.
|
|
|
|
|
|
|
|
They incorporated a spurious newline which needs to be
removed.
|
|
Closes #4997.
|
|
A space character was required after footnote marker, now newline is allowed.
|
|
Ultimately groff lexing should not handle man-specific macros.
This approach also gives more correct results for the test case.
|
|
We also introduce a new type ManTokens (a sequence of tokens)
and remove MComment. This allows lexers to return empty strings
of tokens, or multiple tokens (as when macros are resolved).
One test still fails. This needs to be fixed by moving handling
of .BI, .I, etc. to the parsing phase.
|
|
|
|
Closes #4989.
|
|
Closes #4978.
|
|
Previously empty headers caused parser to terminate without parsing the rest of the document.
|
|
|
|
- Improved support for custom macro definitions.
- LinePart type has been added. RoffStr is now one
constructor of LinePart (the other being MacroArg).
- MComment has lost its argument.
- MEndMacro has been removed.
- MStr has been removed (we now simply use LinePart).
- Macros now store a list of tokens.
- Each macro argument is a [LinePart], instead of a LinePart.
- .BR now behaves as documented in man (and doesn't create a link).
|
|
|
|
Closes #4981.
|
|
Closes #4987.
|
|
Output files confirmed not to be corrupt, and with content as
expected, on PowerPoint 2013 on Windows 10 (virtualbox on linux).
|
|
This should just add to metadata (title, date, section),
and not produce a level-1 header. (That might be done
in the template, depending on the output format.)
|
|
- .SH should be level 1, .SS level 2.
- The header title can come on the next line.
|
|
When the definition is just one paragraph, we don't need
the `.RS\n.RE`.
|
|
Closes #4985.
|
|
Closes #4983.
|
|
use `trimInlines` for Para content to avoid leading and
trailing spaces.
Fix handling of \" in middle of line.
Add more tests for escapes.
|
|
|
|
|
|
|
|
It is the ascii - sign, not the unicode hyphen.
|
|
|
|
- `--ascii` is now turned on automatically for man output, for
portability. All man output will be escaped to ASCII.
- In T.P.Writers.Groff, `escapeChar`, `escapeString`, and
`escapeCode` now take a boolean parameter that selects
ascii-only output. This is used by the Ms writer for
`--ascii`, instead of doing an extra pass after writing
the document.
- In ms output without `--ascii`, unicode is used whenever
possible (e.g. for double quotes).
- A few escapes are changed: e.g. `\[rs]` instead of `\\` for
backslash, and `\ga]` instead of `` \` `` for backtick.
|
|
|
|
(unexported module). These are used in both the man and ms
writers.
Moved groffEscape out of Text.Pandoc.Writers.Shared [cancels earlier
API change from adding it, which was after last release].
This fixes strong/code combination on man (should be `\f[CB]` not
`\f[BC]`), mentioned in #4973.
Updated tests.
Closes #4975.
|
|
Fixes #4973
|