azu/gitbook-plugin-include-codeblock

Allow to put marker in xml

eiswind opened this issue · 2 comments

xml has a different way of writing comments. Maybe I'm jus dumb, but I fail to put markers for snippets in xml files. I tried various variants but they are not recognized. Is there a way to achieve this?

azu commented

This feature have been introduced in #12 by @gdolle
This feature is based on https://www.stack.nl/~dimitri/doxygen/manual/commands.html#cmdsnippet
I don't know how doxygen support XML.

Current implementation may support following style.
(I do not try it yet)

<!-- [marker] -->
<paragraph />
<!-- [marker] -->

const commentOpen = "(/+/+|#|%|/\\*|<!--)";
const commentClose = "(\\*/|-->)?";

Thanks for pointing me to the right place in the code. After understanding the regex patterns I found that

<!--![vaadin]-->

works fine