azu / gitbook-plugin-include-codeblock

GitBook plugin for including file
Other
40 stars 25 forks source link

Allow to put marker in xml #63

Closed eiswind closed 6 years ago

eiswind commented 6 years ago

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 6 years ago

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] -->

https://github.com/azu/gitbook-plugin-include-codeblock/blob/e9756feca1ed434c22e8a332769b4bcc13f9d4ed/src/marker.js#L16-L17

eiswind commented 6 years ago

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

<!--![vaadin]-->

works fine