-
Notifications
You must be signed in to change notification settings - Fork 174
Open
Description
I created a block processor extension that transform blocks of type "test" to regular sidebars, nothing spectacular (it does a bit more, but this is not of interest to the problem statement). Recently I found out that the block processor's parseContent() function does not perform substitutions, even if explicitly passed as attributes. Example code (Kotlin):
@Name("test")
@Contexts(Contexts.SIDEBAR)
@ContentModel(ContentModel.COMPOUND)
public class TestProcessor : BlockProcessor("test") {
public override fun process(
parent: StructuralNode,
reader: Reader,
attributes: MutableMap<String, Any>,
): Any {
val block = createBlock(
parent, "sidebar", mapOf(
Options.ATTRIBUTES to attributes,
ContentModel.KEY to ContentModel.COMPOUND
)
)
parseContent(block, reader.readLines())
return block
}
}The following content spits out the sidebar without any substution:
== Test
:attr: Foobar
[test#id, subs=normal]
****
Here is a sidebar with failed substitutions: {attr}
****results in
while the converter without any block processors being applied substitutes attributes correctly.
Is that behavior on purpose, is it a bug or did I do something wrong?
Thanks for your help!
Metadata
Metadata
Assignees
Labels
No labels
