Skip to content

Commit

Permalink
Allow unknown user attributes in section titles
Browse files Browse the repository at this point in the history
This was breaking parsing some test plan documents
  • Loading branch information
hasty committed Jun 26, 2024
1 parent a018f84 commit df65320
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion matter/spec/section.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ func buildSectionTitle(doc *Doc, title *strings.Builder, els ...asciidoc.Element

attr, ok := doc.attributes[asciidoc.AttributeName(e.Name())]
if !ok {
err = fmt.Errorf("unknown section title attribute: %s", e.Name())
title.WriteRune('{')
title.WriteString(e.Name())
title.WriteRune('}')
slog.Warn("unknown section title attribute", "name", e.Name())
return
}
switch val := attr.(type) {
Expand Down

0 comments on commit df65320

Please sign in to comment.