diff options
-rw-r--r-- | doc/documentation.rst | 51 | ||||
-rw-r--r-- | rst_parser.lua | 3 |
2 files changed, 53 insertions, 1 deletions
diff --git a/doc/documentation.rst b/doc/documentation.rst index acb8b18..4a5a692 100644 --- a/doc/documentation.rst +++ b/doc/documentation.rst @@ -231,6 +231,57 @@ v First order list, fifth entry. .. caution:: Don’t forget the blank lines between list items. +Line Blocks +*********** + +Line blocks are a convenient environment for parts of the text +that need to preserve line breaks and indentation. This makes it +the first choice for most kinds of poems: :: + + | When does a dream begin? + | Does it start with a goodnight kiss? + | Is it conceived or simply achieved? + | When does a dream begin? + | + | When does a dream begin? + | Is it born in a moment of bliss? + | Or is it begun when two hearts are one? + | When does a dream exist? + | + | The vision of you appears somehow + Impossible to resist + | But I'm not imagining seeing you + For who could have dreamed of this? + | + | When does a dream begin? + | When reality is dismissed? + | Or does it commence when we lose all pretence? + | When does a dream begin? + +Indentation, continued lines, etc. should work out without +problems: + +| When does a dream begin? +| Does it start with a goodnight kiss? +| Is it conceived or simply achieved? +| When does a dream begin? +| +| When does a dream begin? +| Is it born in a moment of bliss? +| Or is it begun when two hearts are one? +| When does a dream exist? +| +| The vision of you appears somehow + Impossible to resist +| But I'm not imagining seeing you + For who could have dreamed of this? +| +| When does a dream begin? +| When reality is dismissed? +| Or does it commence when we lose all pretence? +| When does a dream begin? + + ========== Directives ========== diff --git a/rst_parser.lua b/rst_parser.lua index 5cf974c..c42b53e 100644 --- a/rst_parser.lua +++ b/rst_parser.lua @@ -559,7 +559,8 @@ local parser = P{ line_block = Cs(V"line_block_first" * (V"line_block_other" + V"line_block_empty")^1) - * V"blank_line" + --* V"blank_line" + * V"end_block" / rst.line_block , |