Skip to content

Commit

Permalink
NL_NO_BULLET
Browse files Browse the repository at this point in the history
  • Loading branch information
benjie committed Apr 2, 2021
1 parent dbdc8f0 commit b71def1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/grammar.pegjs
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ production = BLOCK token:nonTerminal _ defType:(':::'/'::'/':') rhs:productionRH

productionRHS = oneOfRHS / singleRHS / listRHS

oneOfRHS = !(LINE listBullet) __ 'one of' WB rows:(__ (NL _ listBullet?)? (_ token)+)+ {
oneOfRHS = !(LINE listBullet) __ 'one of' WB NL_NO_BULLET? rows:(__ (NL _ listBullet?)? (_ token)+)+ {
return {
type: 'OneOfRHS',
rows: rows.map(row => row[2].map(tokens => tokens[1]))
Expand Down Expand Up @@ -783,6 +783,7 @@ DEDENT = &lineStart !{ indentStack.length === 0 } {
NL = '\n' / '\r' / '\r\n'
NOT_NL = [^\n\r]
SINGLE_NL = NL !(NL / _ listBullet)
NL_NO_BULLET = NL !(_ listBullet)
_ = ' '*
// Skips over whitespace including a single newline. Do not use more than once
// in a row, otherwise multiple NL will be skipped.
Expand Down

0 comments on commit b71def1

Please sign in to comment.