aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2025-05-17 18:41:10 +0200
committerJonas Smedegaard <dr@jones.dk>2025-05-17 18:41:10 +0200
commit87c7a9c4e518f3384c1ff9fd7927d65691a6378c (patch)
tree9b0ec2496a5ac8ff1130ff003d6c02b57608f8c1
parent4c93323a09fe9fbbe8c866eaed9022eff66a1ea1 (diff)
relax HardBreak grammar
-rw-r--r--def.peg2
-rwxr-xr-xdef_HardBreak.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/def.peg b/def.peg
index b1cb09f..263b657 100644
--- a/def.peg
+++ b/def.peg
@@ -26,7 +26,7 @@ LinkedWords <- '[' Words ']' '(' Uri ')'
AnnotatedWords <- '[' Words ']' '{' ![{}] PlainWords '}'
PlainWords <- PRINTABLES (SPACE PRINTABLES)*
Uri <- '<' ![<>] PRINTABLES? '>' / ![<>] PRINTABLES
-HardBreak <- SPACE SPACE NEWLINE
+HardBreak <- SPACE SPACE+ NEWLINE
# Terminals
PRINTABLES <- [[:graph:]]+
diff --git a/def_HardBreak.py b/def_HardBreak.py
index 386487d..cdc3c62 100755
--- a/def_HardBreak.py
+++ b/def_HardBreak.py
@@ -9,7 +9,7 @@ from railroad import *
Diagram(
Start("complex"),
NonTerminal("SPACE"),
- NonTerminal("SPACE"),
+ OneOrMore(NonTerminal("SPACE")),
NonTerminal("NEWLINE"),
End("complex")
).writeStandalone(