Skip to content

Commit

Permalink
feat(frontend): add attributes grammar for headings
Browse files Browse the repository at this point in the history
Attributes for headings must come on a new line without blank line
between heading they apply to.
  • Loading branch information
nfejzic committed Jan 13, 2022
1 parent d7dd8d1 commit f680542
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/grammar/unimarkup.pest
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ atomic_block = { (!blank_line ~ ANY)+ }

// ****** HEADINGS ******
heading_start = @{ um_newline? ~ "#"{1,6} ~ um_nbsp }
heading_content = { ( !( um_newline ~ heading_start ) ~ ANY )+ ~ um_newline? }
heading = { heading_start ~ heading_content }
heading_content = { ( !( um_newline ~ ( heading_start | attributes ) ) ~ ANY )+ }
heading = { heading_start ~ heading_content ~ um_nbsp* ~ ( um_newline ~ attributes )? }
headings = { heading+ }

// ****** PARAGRAPH ******
Expand Down

0 comments on commit f680542

Please sign in to comment.