Aha! OK, I completely forgot that CM parser is based on Lezer (which is inspired or based on Tree-Sitter, AFAIK). So is it really so that SB can theoretically use the resulting AST for, e.g. indexing etc. and referencing things? Let’s discuss it more futher, please.
The primary issue with SB I see and have (and now I also see it has probably nothing to do with the SB’s parser) is that things like tags and attributes are not “scoped” to the the AST leafs (and their ancestors). This is what I think should be unified for both and fixed. Tags and attributes should be scoped and handled exactly the same way and a way to reference certain paragraph or list item or table cell should be provided, if possible, IMHO.
Once I know SB has true AST “at hand,” some better way of referencing into the documents (pages) AST also seems to be possible (there is already a stalled discussion about this here, and some issues as well, my ideas to extend the referencing capabilities as a fresh SB user the time, I can perhaps imagine something better now).
While having the AST at hand we can get rid of many limitations such as not having full UTF-8 support for anything everywhere, which may be (?) be achieved just by extending the markdown parser (e.g., tags containg characters like [ěščřžýáíéůú]
etc. does not autocomplete now which is a great limitation for people not using English language / ASCII? exclusively).
I am just in search of some way to unify the mentioned things somehow so that SB behaves in more intuitive, natural and coherent way. To be honnest, I was quite surprised when I realized I can not access individual table cells by tags, for example. All of these are just my ideas on how I think SB should be extended and “polished”, I mean the very core functionality (indexing, referencing, encoding).