diff options
| author | Philipp A | 2018-11-24 17:27:04 +0100 |
|---|---|---|
| committer | Philipp A | 2018-11-24 17:27:04 +0100 |
| commit | 3611e6d910d434d1a3046d743e3c7f5e0b443250 (patch) | |
| tree | a4231f48b7f29aa1d84f7eec8f4a43d97825afea /src | |
| parent | 0a6d381d8d4f860eeaba49d3c79ac75afc6d4763 (diff) | |
| download | rust-rst-3611e6d910d434d1a3046d743e3c7f5e0b443250.tar.bz2 | |
Require lines to contain things
Diffstat (limited to 'src')
| -rw-r--r-- | src/rst.pest | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rst.pest b/src/rst.pest index b7888a4..d6af870 100644 --- a/src/rst.pest +++ b/src/rst.pest @@ -40,7 +40,7 @@ hanging_block = _{ // Admonition. A block type. The generic one has a title -admonition = { ".." ~ PUSH(" "+) ~ "admonition::" ~ !blank_line ~ line ~ blank_line* ~ admonition_body? ~ DROP } +admonition = { ".." ~ PUSH(" "+) ~ "admonition::" ~ line ~ blank_line* ~ admonition_body? ~ DROP } admonition_gen = { ".." ~ PUSH(" "+) ~ admonition_type ~ "::" ~ (blank_line | line) ~ blank_line* ~ admonition_body? ~ DROP } admonition_type = { "attention" | "caution" | "danger" | "error" | "hint" | "important" | "note" | "tip" | "warning" } admonition_body = _{ PEEK[..-1] ~ PUSH(" " ~ POP) ~ hanging_block ~ block* } //TODO: merge with other directives? @@ -69,7 +69,7 @@ blist_body = _{ PEEK[..-1] ~ PUSH(" " ~ POP) ~ hanging_block ~ block* } // paragraph. A block type. paragraph = { line ~ (PEEK[..] ~ line)* } // TODO: use inlines here -line = { !marker ~ (!NEWLINE ~ ANY)+ ~ NEWLINE } +line = { !marker ~ !blank_line ~ (!NEWLINE ~ ANY)+ ~ NEWLINE } blank_line = _{ !marker ~ " "* ~ NEWLINE } // character classes |
