apple/swift-markdown

Ability to make custom Markups

Opened this issue · 0 comments

It seems that one cannot make custom things conforming to Markup, because things like AbsoluteRawMarkup and _MarkupData's init method are not public. I'd like to be able to make these. Current use case: I'd like to make a Mention type; this should be similar to Text but with an extra piece of data. I'd like to be able to insert it into the tree, but without access to the above things, it gets turned into a regular Text markup element as soon as I add it as a child of something.