question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CoreNodeFormatter does not descend into children on Link nodes

See original GitHub issue

When the CoreNodeFormatter renders Link nodes it does not descend into its children like other inline containers ie.

private void render(Emphasis node, NodeFormatterContext context, MarkdownWriter markdown) {
	markdown.append(node.getOpeningMarker());
	context.renderChildren(node);
	markdown.append(node.getOpeningMarker());
}

Instead it simply appends the node chars. In my mind this is inconsistent and concretely it means that it will not format my ast manipulation.

I assume that it would be more correct to do much of the same as in the translating context.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
vschcommented, Jan 21, 2019

@spand, for your use case you can get the results you want if you update the parent link’s text with your updated text.

I will need to change the formatter implementation for handling translating and non-translating text sequences before I can make link nodes unconditionally descend into link text child elements.

Original implementation did not consider having the AST change without updating the equivalent parent text content.

0reactions
spandcommented, Jan 21, 2019

Awesome. Thanks once again !

Read more comments on GitHub >

github_iconTop Results From Across the Web

clicking on node to expand childs cause child to be opened in ...
Hi , when i click on a node with "hidden" children ( as in the examples ) the child nodes opens in a...
Read more >
d3js: make new parent data descend into child nodes
There are 2 ways to propagate the data from parents to children: selection.select will do this implicitly.
Read more >
TikZ - Edges from children does not connect to parent node
Now I want to add some labels to the edges, but the shape of the tree doesn't look right. ... The error only...
Read more >
How to add a wired child node using the LinksysSmartWiFi ...
8. Connect an ethernet cable to the parent node and the other end of the cable to the child node. The nodes will...
Read more >
LRN: Quick Tips – Working with Regions - Shotgun Debugging
Structured trivia are an interesting corner case within Roslyn. ... whether or not we should descend into the children of a given node....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found