Convert Godot BBCode cross-refs and codeblocks to Markdown#3
Merged
Conversation
Use bbcodez's callback system to handle Godot-specific BBCode tags that were passing through unconverted to the markdown cache: - Cross-reference tags ([member], [method], [param], [constant], [signal], [enum], [annotation], [theme_item]) now render as inline code or italic markdown - Bare class references ([Node2D], [@GDscript]) render as inline code - [codeblock] tags render as fenced code blocks with dedented content - [codeblocks] with [gdscript]/[csharp] sections render as separate language-tagged fenced blocks Configured bbcodez with equals_required_in_parameters=false to parse space-separated Godot tags, is_self_closing_fn for tags without closing pairs, and verbatim_tags for code block content preservation.
Snapshot tests covering cross-reference tags, bare class refs, mixed Godot + standard BBCode, codeblocks, multi-language codeblocks, and full XML-to-markdown roundtrip.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
[member],[method],[param],[constant],[signal],[enum],[annotation],[theme_item]) render as inline code or italic[Node2D],[@GDScript]) render as inline code[codeblock]renders as fenced code blocks with auto-dedented content[codeblocks]with[gdscript]/[csharp]sections render as separate language-tagged fenced blocksBefore
After
Test plan
zig build test— all 14 new tests + existing tests passgdoc Node2D— cross-refs converted in class indexgdoc Node2D.look_at—[param],[method]converted in member docsgdoc Vector2.from_angle—[codeblock]renders as fenced codegdoc Rect2.grow—[codeblocks]renders both gdscript and csharp blocksgdoc CharacterBody2D.get_slide_collision— indented code preserves relative indentation