summaryrefslogtreecommitdiff
path: root/src/Text
Commit message (Collapse)AuthorAge
* Org reader: stop adding rundoc prefix to src paramsAlbert Krewinkel2017-04-23
| | | | | | | | | | | Source block parameter names are no longer prefixed with *rundoc*. This was intended to simplify working with the rundoc project, a babel runner. However, the rundoc project is unmaintained, and adding those markers is not the reader's job anyway. The original language that is specified for a source element is now retained as the `data-org-language` attribute and only added if it differs from the translated language.
* Org reader: handle line numbering switch for src blocksAlbert Krewinkel2017-04-23
| | | | | | | The line-numbering switch that can be given to source blocks (`-n` with an start number as an optional parameter) is parsed and translated to a class/key-value combination used by highlighting and other readers and writers.
* HTML reader: Revise treatment of li with id attribute.John MacFarlane2017-04-23
| | | | | | | | | | | | | | | | Previously we always added an empty div before the list item, but this created problems with spacing in tight lists. Now we do this: If the list item contents begin with a Plain block, we modify the Plain block by adding a Span around its contents. Otherwise, we add a Div around the contents of the list item (instead of adding an empty Div to the beginning, as before). Closes #3596.
* Add siunitx Support (#3588)schrieveslaach2017-04-22
| | | | | | | | | | | For example: ```latex \SI[round-precision=2]{1}{m} is equal to \SI{1000}{mm}. \SI[round-precision=2]{1}[\$]{} is equal to \SI{0.938094}{\euro} ```
* Lua: drop useless filter function type parameterAlbert Krewinkel2017-04-18
| | | | | The return-type parameter for lua filter functions is removed. It only complicated the code without introducing any additional type safety.
* Org reader: allow emphasized text to be followed by `[`Albert Krewinkel2017-04-16
| | | | Closes: #3577
* Read image size of Inkscape SVGs (#3580)schrieveslaach2017-04-16
|
* Org reader: convert markup at beginning of footnotesAlbert Krewinkel2017-04-16
| | | | Closes: #3576
* Lua filter: revert to non-destructuring filtersAlbert Krewinkel2017-04-15
| | | | | We want to provide an interface familiar to users of other filtering libraries.
* Small fix to error reporting in App.John MacFarlane2017-04-15
| | | | Closes #3548.
* Avoid parsing "Notes:**" as a bare URI.John MacFarlane2017-04-15
| | | | | | | This avoids parsing bare URIs that start with a scheme + colon + `*`, `_`, or `]`. Closes #3570.
* Error: Added PandocCouldNotFindDataFileError.John MacFarlane2017-04-15
| | | | | Use this instead of PandocAppError when appropriate. Removed exit code from PandocAppError, use 1 for all.
* Fixed shadowing warningsJohn MacFarlane2017-04-15
|
* Docx reader: removed readDocxWithWarnings (API change).John MacFarlane2017-04-15
| | | | No longer necessary with pandoc 2.0 framework.
* App: use PandocOptionError instead of PandocAppError where appropriate.John MacFarlane2017-04-15
|
* Error: Added PandocFilterError.John MacFarlane2017-04-15
|
* Error: Added PandocPDFErrorJohn MacFarlane2017-04-15
|
* Text.Pandoc.Error: added new constructors.John MacFarlane2017-04-15
| | | | | | - PandocSyntaxMapError String - PandocFailOnWarningError - PandocPDFProgramNotFoundError String
* Revised error message for pandoc -t pdf.John MacFarlane2017-04-15
|
* Lua filter: use Attributes constructor for AttrsAlbert Krewinkel2017-04-15
| | | | | | Element attributes are pushed to the stack via the `Attributes` function. `Attributes` creates an Attr like triple, but the triple also allows table-like access to key-value pairs.
* Lua filter: allow shorthand functions for math and quotedAlbert Krewinkel2017-04-14
| | | | | Allow to use functions named `SingleQuoted`, `DoubleQuoted`, `DisplayMath`, and `InlineMath` in filters.
* Lua filter: Re-order code of stack value instancesAlbert Krewinkel2017-04-14
|
* Lua filter: use lua strings for nullary constructorsAlbert Krewinkel2017-04-14
| | | | | | | Lua string are used to represent nullary data constructors. The previous table-based representation was based on the JSON serialization, but can be simplified. This also matches the way those arguments are passed to custom writers.
* Avoid repeating StackValue instances definitionsAlbert Krewinkel2017-04-14
| | | | | | The lua filters and custom lua writer system defined very similar StackValue instances for strings and tuples. These instance definitions are extracted to a separate module to enable sharing.
* Extract lua helper functions into Lua.Util moduleAlbert Krewinkel2017-04-14
|
* Use lua bools and strings for MetaBool, MetaStringAlbert Krewinkel2017-04-14
| | | | | | | | Native lua booleans and strings are used to represent MetaBool and MetaString values. This is more natural than the previous table-based representation. The old lua representation can still be read back to haskell, ensuring compatibility with the `pandoc.MetaBool` and `pandoc.MetaString` lua constructors.
* Lua filter: use destructured functions for block filtersAlbert Krewinkel2017-04-14
| | | | | | Filtering functions take element components as arguments instead of the whole block elements. This resembles the way elements are handled in custom writers.
* Drop dependency on hslua-aesonAlbert Krewinkel2017-04-14
| | | | | Pushing values to the lua stack via custom functions is faster and more flexible.
* Push blocks via lua constructors and constantsAlbert Krewinkel2017-04-14
| | | | | All element creation tasks are handled by lua functions defined in the pandoc module.
* Push inlines via lua constructors and constantsAlbert Krewinkel2017-04-14
| | | | All element creation tasks are handled in the lua module.
* Use lua constructors to push meta valuesAlbert Krewinkel2017-04-13
|
* Lua filter: use destructured functions for inline filtersAlbert Krewinkel2017-04-12
| | | | | | Instead of taking the whole inline element, forcing users to destructure it themselves, the components of the elements are passed to the filtering functions.
* s/safed/saved/Alexander Krotov2017-04-14
|
* Man writer: Fix handling of nested font commands.John MacFarlane2017-04-12
| | | | | | | Previously pandoc emitted incorrect markup for bold + italic, for example, or bold + code. Closes #3568.
* Lua filter: use custom StackValue Inline instanceAlbert Krewinkel2017-04-11
| | | | Inline elements are no longer pushed and pulled via aeson's Value.
* Docx writer: don't take "distArchive" from datadir.John MacFarlane2017-04-10
| | | | | | | | | | | | | | | | | The docx writer takes components from the distribution's version of reference.docx when it can't find them in a user's custom reference.docx. (This sometimes happens because Word will sometimes omit components needed for larger documents when saving a simple one.) Previously, we allowed a reference.docx in the data directory (e.g. `~/.pandoc`) to be used as the distribution's reference.docx. This led to a bizarre situation where pandoc would produce a good docx using `--template ~/.pandoc/ref.docx`, but if `ref.docx` were moved to `~/.pandoc/reference.docx`, it would then produce a corrupted docx. Closes #3322 (I think).
* Lua filter: improve doc filter performanceAlbert Krewinkel2017-04-07
| | | | | Pandoc elements are pushed and pulled from the lua stack via custom instances.
* Lua filter: Improve block filter performanceAlbert Krewinkel2017-04-06
| | | | | | Reading of simple block values from the lua stack is handled manually, but most block constructors are still handled via instances of aeson's Value type.
* Lua filter: Improve inline filter performanceAlbert Krewinkel2017-04-06
| | | | | | | Getting inline instances from the lua stack is handled manually for some simple inline constructors, including the `Str` constructor. This avoids the indirect route through aeson's Value type and improves performance considerably (approx. 30% speedup for some filters).
* Use lua registry instead of named globalsAlbert Krewinkel2017-04-04
| | | | | This is slightly cleaner while keeping performance approximately the same.
* Ms writer: wider indents for lists.John MacFarlane2017-04-06
| | | | | Previously some indents weren't wide enough, leading the list item to start on a line after the marker.
* Allow raw latex commands starting with `\start` in Markdown.John MacFarlane2017-04-06
| | | | | | | | Previously these weren't allowed because they were interpreted as starting ConTeXt environments, even without a corresponding \stop... Closes #3558.
* Ms writer: respect text wrapping options.John MacFarlane2017-04-05
|
* Ms writer improvements:John MacFarlane2017-04-04
| | | | | - added some variables to the default template. - cleaner output for images (stringify alt text).
* Ms writer: ensure that @ is escaped in URIs.John MacFarlane2017-04-04
| | | | | Otherwise we may get unescaped @s that give eqn fits, with @ as the delimiter character.
* Error: Added PandocOptionError.John MacFarlane2017-04-04
|
* Add original classes to JS obfuscated links (#3554)Timm Albers2017-04-04
| | | | | | | HTML links containing classes originally now preserve them when using javascript email obfuscation. Fixes #2989
* Add class to footnote back referencesTimm Albers2017-04-03
| | | | | The HTML writer now also adds the class footnoteBack to back references of footnotes. This allows for easier CSS styling.
* Include \VerbatimFootnotes for highlighted code blocksTimm Albers2017-04-03
| | | | | | Updated the LaTeX writer to also include \VerbatimFootnotes in the preamble for highlighted code blocks. Previously this was only done for raw code blocks.
* Removed unused import.John MacFarlane2017-04-03
|