This PR adds a new initializer to Aside that only returns a new instance if it successfully finds an aside tag at the beginning of the block-quote. To make the API fully flexible, this API introduces three separate modes to this initializer:
tagNotRequired, which defers to the currently-available initializer that creates a .note aside if it can't find a tag,
requireSingleWordTag, which requires that the block starts with a single-word tag (and is used by the new HTML formatter), and
requireAnyLengthTag, which requires that the block starts with a tag (defined as any text prefixed by a colon), even tags with multiple words like See Also:.
Dependencies
None
Testing
As this is an API-only change, the testing strategy is limited to automated testing.
Checklist
Make sure you check off the following items. If they cannot be completed, provide a reason.
Bug/issue #, if applicable: Resolves #139
Summary
This PR adds a new initializer to Aside that only returns a new instance if it successfully finds an aside tag at the beginning of the block-quote. To make the API fully flexible, this API introduces three separate modes to this initializer:
tagNotRequired
, which defers to the currently-available initializer that creates a.note
aside if it can't find a tag,requireSingleWordTag
, which requires that the block starts with a single-word tag (and is used by the new HTML formatter), andrequireAnyLengthTag
, which requires that the block starts with a tag (defined as any text prefixed by a colon), even tags with multiple words likeSee Also:
.Dependencies
None
Testing
As this is an API-only change, the testing strategy is limited to automated testing.
Checklist
Make sure you check off the following items. If they cannot be completed, provide a reason.
./bin/test
script and it succeeded