Skip to content

Commit

Permalink
Merge pull request #121 from laws-africa/generic-block
Browse files Browse the repository at this point in the history
support blockContainer
  • Loading branch information
longhotsummer authored Nov 26, 2024
2 parents 5d264fb + 2615771 commit 878d942
Show file tree
Hide file tree
Showing 8 changed files with 341 additions and 120 deletions.
22 changes: 21 additions & 1 deletion bluebell/akn.peg
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ grammar akn

nested_block_element <- indent content:block_element+ dedent <NestedBlockElement>

block_elements <- block_list / bullet_list / table / longtitle / footnote / block_quote / p / line
block_elements <- block_list / bullet_list / table / longtitle / footnote / block_quote / blocks / p / line

# ------------------------------------------------------------------------------
# Speech blocks for debates
Expand Down Expand Up @@ -292,6 +292,26 @@ grammar akn
# could start a line.
line <- !dedent content:inline+ eol <Line>

# ------------------------------------------------------------------------------
# Block container, which can contain other blocks
#
# Note: the intro and wrapUp contain blocks, which actually means they're not necessary because the blockContainer
# can contain any block. So we just don't use them.
#
# BLOCKS
# intro
#
# ITEMS
# ITEM 1
#
# wrapUp

# block container element, for grouping blocks
blocks <- 'BLOCKS' attrs:block_attrs? eol
indent
content:block_element+
dedent <BlockContainer>


# ------------------------------------------------------------------------------
# Block lists
Expand Down
Loading

0 comments on commit 878d942

Please sign in to comment.