summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <pgesang@ix.urz.uni-heidelberg.de>2010-09-24 15:38:46 +0200
committerPhilipp Gesang <pgesang@ix.urz.uni-heidelberg.de>2010-09-24 15:38:46 +0200
commit1af3e6e47b9072c481aa2d40cedd3b9b99220817 (patch)
tree909b0c1c0fa351f8be034f04d0d99b3813d5b223
parent158bf4cc70deff33c6b9016f73ea4c254f03f777 (diff)
downloadcontext-rst-1af3e6e47b9072c481aa2d40cedd3b9b99220817.tar.gz
added line block example to manual
-rw-r--r--doc/documentation.rst51
-rw-r--r--rst_parser.lua3
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
,