aboutsummaryrefslogtreecommitdiffstats
path: root/src/rst.pest
diff options
context:
space:
mode:
authorPhilipp A2018-11-15 22:31:53 +0100
committerPhilipp A2018-11-15 22:31:53 +0100
commit6316d8374655ff3debe33defc7697844fc8a7cb6 (patch)
treedaa578a226ba2b24c6f8ef51cb7909e0e9eb2728 /src/rst.pest
parent2c04f8adcbe467e06fb5559dbcd125246f8ab49e (diff)
downloadrust-rst-6316d8374655ff3debe33defc7697844fc8a7cb6.tar.bz2
fixed blank line handling
Diffstat (limited to 'src/rst.pest')
-rw-r--r--src/rst.pest4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rst.pest b/src/rst.pest
index 1c84d52..3d1d3d4 100644
--- a/src/rst.pest
+++ b/src/rst.pest
@@ -39,7 +39,7 @@ hanging_block = _{
// Note. A block type
-admonition = { ".." ~ PUSH(" "+) ~ admonition_type ~ "::" ~ (blank_line | line) ~ admonition_body? ~ DROP }
+admonition = { ".." ~ PUSH(" "+) ~ admonition_type ~ "::" ~ (blank_line | line) ~ blank_line* ~ admonition_body? ~ DROP }
admonition_type = { "attention" | "caution" | "danger" | "error" | "hint" | "important" | "note" | "tip" | "warning" | "admonition" }
admonition_body = _{ PEEK[..-1] ~ PUSH(" " ~ POP) ~ hanging_block ~ block* } //TODO: merge with other directives?
@@ -60,7 +60,7 @@ title = {
// Bullet list. A block type.
bullet_list = { bullet_item ~ (PEEK[..] ~ bullet_item)* }
-bullet_item = { bullet_marker ~ PUSH(" "+) ~ line ~ blist_body? ~ DROP }
+bullet_item = { bullet_marker ~ PUSH(" "+) ~ line ~ blank_line* ~ blist_body? ~ DROP }
blist_body = _{ PEEK[..-1] ~ PUSH(" " ~ POP) ~ hanging_block ~ block* }