Skip to content

Conversation

@rubenporras
Copy link
Contributor

commit 68f9534 added the necessary plugin for support for Github Markdown Tables but this library was not properly wired up. This commit correctly wires Github Markdown Tables support.

commit 68f9534 added the necessary
plugin for support for Github Markdown Tables but this library was not
properly wired up. This commit correctly wires Github Markdown Tables
support.
Comment on lines -114 to +119
Parser parser = Parser.builder().build();
List<Extension> extensions = List.of(TablesExtension.create());
Parser parser = Parser.builder().extensions(extensions).build();
Node document = parser.parse(result);
HtmlRenderer renderer = HtmlRenderer.builder().build();
HtmlRenderer renderer = HtmlRenderer.builder().extensions(extensions).build();
Copy link
Contributor

@FlorianKroiss FlorianKroiss Jan 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The JavaDoc of Parser indicates that the instances is thread-safe. commonmark/commonmark-java#83 seems to indicate that HtmlRendere is also thread-safe
Can we create singleton instances of the classes instead and re-use them?

I think it would also makes sense to make this rendering code into a utility method so we can write a small unit test, which makes sure that Table-Rendering still works.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the comment. Yes, that makes sense, I will do that if I have some extra time.

@rubenporras rubenporras merged commit 3ff7ca7 into eclipse-lsp4e:main Jan 21, 2026
11 checks passed
@rubenporras rubenporras deleted the gfm branch January 21, 2026 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants