go-org-orgwiki/org
Niklas Fasching b61e49eb85 Preserve whitespace (indentation) inside paragraphs
We want original whitespace to be rendered in some cases (e.g. verse
blocks). This requires information about the original whitespace to be
preserved during paragraph parsing. As html ignores (collapses) whitespace by
default we don't have to adapt the html writer and can just selectively enable
rendering of the preseverved whitespace wherever we want it using
css (white-space: pre).

To differentiate meaningful whitespace from document structure based
indentation (i.e. list item base indentation) we need to introduce
document.baseLvl. A paragraph by itself does not have enough information to
differentiate both kinds of whitespace and needs this information as context
[0].

As we're already touching list indentation i went along and improved (fixed?)
descriptive list item indentation rendering in the org writer (it should match
emacs tab behavior - i.e. indent subsequent lines up to the `:: `).

[0] e.g. list items can contain blank lines - a paragraph starting with a blank
line would not know that it is part of a list item / has a base indentation -
the blank line would suggest a baseLvl of 0.
2019-12-22 14:17:14 +01:00
..
testdata Preserve whitespace (indentation) inside paragraphs 2019-12-22 14:17:14 +01:00
block.go Export WriteNodesAsString on writer interface 2019-11-02 23:44:16 +01:00
document.go Preserve whitespace (indentation) inside paragraphs 2019-12-22 14:17:14 +01:00
drawer.go Export WriteNodesAsString on writer interface 2019-11-02 23:44:16 +01:00
footnote.go Export WriteNodesAsString on writer interface 2019-11-02 23:44:16 +01:00
fuzz.go Fix fuzz 2019-01-02 21:22:13 +01:00
headline.go Export WriteNodesAsString on writer interface 2019-11-02 23:44:16 +01:00
html_entity.go Add support for org-entities (e.g. ndash, mdash, \Aacute) 2018-12-11 22:12:51 +01:00
html_writer.go Export WriteNodesAsString on writer interface 2019-11-02 23:44:16 +01:00
html_writer_test.go Add support for extending writers 2019-10-27 16:43:42 +01:00
inline.go Export WriteNodesAsString on writer interface 2019-11-02 23:44:16 +01:00
keyword.go Export WriteNodesAsString on writer interface 2019-11-02 23:44:16 +01:00
list.go Preserve whitespace (indentation) inside paragraphs 2019-12-22 14:17:14 +01:00
org_writer.go Preserve whitespace (indentation) inside paragraphs 2019-12-22 14:17:14 +01:00
org_writer_test.go Add support for extending writers 2019-10-27 16:43:42 +01:00
paragraph.go Preserve whitespace (indentation) inside paragraphs 2019-12-22 14:17:14 +01:00
table.go Export WriteNodesAsString on writer interface 2019-11-02 23:44:16 +01:00
util.go Improve footnote handling 2018-12-26 15:42:12 +01:00
writer.go Export WriteNodesAsString on writer interface 2019-11-02 23:44:16 +01:00