Skip to content

Commit

Permalink
Refactor to use abnf
Browse files Browse the repository at this point in the history
Signed-off-by: Titus <[email protected]>
  • Loading branch information
wooorm authored Jul 31, 2024
1 parent c4397a0 commit 81f4e07
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,19 +256,19 @@ table img {

Tables form with the following BNF:

```bnf
gfm_table ::= gfm_table_head 0*(eol gfm_table_body_row)
```abnf
gfmTable ::= gfmTableHead 0*(eol gfmTableBodyRow)
; Restriction: both rows must have the same number of cells.
gfm_table_head ::= gfm_table_row eol gfm_table_delimiter_row
gfmTableHead ::= gfmTableRow eol gfmTableDelimiterRow
gfm_table_row ::= ['|'] gfm_table_cell 0*('|' gfm_table_cell) ['|'] *space_or_tab
gfm_table_cell ::= *space_or_tab gfm_table_text *space_or_tab
gfm_table_text ::= 0*(line - '\\' - '|' | '\\' ['\\' | '|'])
gfmTableRow ::= ["|"] gfmTableCell 0*("|" gfmTableCell) ["|"] *spaceOrTab
gfmTableCell ::= *spaceOrTab gfmTableText *spaceOrTab
gfmTableText ::= 0*(line - "\\" - "|" / "\\" ["\\" / "|"])
gfm_table_delimiter_row ::= ['|'] gfm_table_delimiter_cell 0*('|' gfm_table_delimiter_cell) ['|'] *space_or_tab
gfm_table_delimiter_cell ::= *space_or_tab gfm_table_delimiter_value *space_or_tab
gfm_table_delimiter_value ::= [':'] 1*'-' [':']
gfmTableDelimiterRow ::= ["|"] gfmTableDelimiterCell 0*("|" gfmTableDelimiterCell) ["|"] *spaceOrTab
gfmTableDelimiterCell ::= *spaceOrTab gfmTableDelimiterValue *spaceOrTab
gfmTableDelimiterValue ::= [":"] 1*"-" [":"]
```

As this construct occurs in flow, like all flow constructs, it must be
Expand Down

0 comments on commit 81f4e07

Please sign in to comment.