Skip to content

Commit

Permalink
refactor(parser): merge 'AdmonitionParagraph' and 'Paragraph' rules (#…
Browse files Browse the repository at this point in the history
…1031)

also, rename `ListElementContinuation` to `ListContinuation`
  • Loading branch information
xcoulon authored May 25, 2022
1 parent d602a4a commit 113f625
Show file tree
Hide file tree
Showing 6 changed files with 45,993 additions and 44,494 deletions.
2 changes: 1 addition & 1 deletion pkg/parser/document_processing_apply_substitutions.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func applySubstitutionsOnElement(ctx *ParseContext, element interface{}, opts ..
return applySubstitutionsOnWithTitle(ctx, b, opts...)
case *types.Table:
return applySubstitutionsOnTable(ctx, b, opts...)
case *types.ListElementContinuation:
case *types.ListContinuation:
return applySubstitutionsOnElement(ctx, b.Element, opts...)
case types.WithElements:
return applySubstitutionsOnWithElements(ctx, b, opts...)
Expand Down
2 changes: 1 addition & 1 deletion pkg/parser/document_processing_arrange_lists.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func (s *listStack) parentFor(element interface{}) *types.List {
// if log.IsLevelEnabled(log.DebugLevel) {
// log.Debugf("looking-up parent for %s", spew.Sdump(element))
// }
if c, ok := element.(*types.ListElementContinuation); ok {
if c, ok := element.(*types.ListContinuation); ok {
for i := 0; i < c.Offset; i++ {
s.pop()
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/parser/document_processing_parse_fragments.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func reparseElement(ctx *ParseContext, element interface{}) error {
return err
}
}
case *types.ListElementContinuation:
case *types.ListContinuation:
if err := reparseElement(ctx, e.Element); err != nil {
return err
}
Expand Down
Loading

0 comments on commit 113f625

Please sign in to comment.