Inserted Node doesn't get rendered?
See original GitHub issueFor some reason (lack of morning coffee maybe), I posted a question to StackOverflow before coming here.
I’m trying to get Flexmark to render image alt text as a caption, the way Pandoc does it. I made a Visitor that visits all Image Nodes and does this:
BasedSequence text = image.getText();
Paragraph caption = new Paragraph(text);
Node parent = image.getParent();
parent.insertAfter(caption);
I have verified during debugging that calling parent.getNext()
after this correctly returns my caption Paragraph object, so as far as I can tell, it’s getting inserted correctly. However, when the document is rendered, the Paragraph I inserted isn’t there.
Am I doing something wrong, or is this a bug? Thanks!
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
"Failed to execute 'insertBefore' on 'Node'" · Issue #2128 ...
When inserting a node during the render process, if nextSibling is not a proper child of parent then the following error occurs: DOMException: ......
Read more >Express Handlebars Won't Render Data - Stack Overflow
Try to strip the data from its context object properties by doing this; model = model.toJSON();. – MAS · Hi Mas, thanks for...
Read more >Image doesn't appear in 'Render Layers' node in compositor
In every tutorial, when they open the compositor tab, the image appears in the 'render layers' node. However, as you can see, mine...
Read more >Troubleshooting Guide - React Flow
Troubleshooting. This guide contains warnings and errors that can occur when using React Flow. We are also adding common questions and pitfalls that...
Read more >Cycles add the glare node to your render. - YouTube
During last night's BlenderRoyale Draise add glare to his cycles render I thought I would quickly cover this technique.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@sez11a, you are welcome.
BTW, I cannot blame you for not being able to figure it out when I have not provided good enough docs to describe the internals. I have added a todo item on my list to give a better overview of the architecture and internal workings.
Of course every question leads to more samples. I will add a cross reference for samples in the docs too.
Feel free to close the issue.
https://github.com/vsch/flexmark-java/blob/master/flexmark-java-samples/src/com/vladsch/flexmark/java/samples/NodeInsertingPostProcessorSample.java