There has been discussion in the past about a specification for Obsidian flavoured markdown, with the answer on the linked post mentioning that Obsidian only has a few additions from Commonmark, however the semantics of these additions are in some cases quite unclear.
It seems like comments are neither inline nor block elements given the way they can sit within text, but have new lines within them, such as below:
some text %% with
a comment
spanning multiple lines %% and some text after
However in cases like this one, the comment is not stripped out, yet the closing (but not the opening) comment delimiter is not displayed:
# title %%
text which is not in the comment
%%
While putting a code block within a comment causes the code block to still be rendered, along with the other text, but the quote delimiters to be removed:
%% here is a comment with a code block
```
some code
```
%%
I was wondering if these strange cases could be treated as bugs, or we could get some kind of specification or open sourcing of the parser so that it would be clear how comments actually work.