This is my first attempt at a plugin, so please be gentle ;-)
I started off with the color plugin https://www.dokuwiki.org/devel:syntax_plugins#sample_plugin_2_-_color
, at that makes sense to me.
Now I want to make some decisions based on the attributes of the opening tag. This is handled in DOKU_LEXER_ENTER, all well and good, but the DOKU_LEXER_EXIT needs to be aware of what happened in DOKU_LEXER_ENTER - How do I do that?
For example if the color in the mentioned plugin equals blue, I want the text to be in a <code> block instead of a <span> and hence I need to DOKU_LEXER_EXIT to put a </code> tag instead of the </span> tag based on the attribute of the opening <color> tag.
I hope that makes sense and someone can point me in the right direction.