Skip to content

feat(markdown): add treeblood extensions for enhanced markdown parsing - #146

Merged
yoonhyunwoo merged 1 commit into
gosuda:mainfrom
yoonhyunwoo:feature/treeblood-extensions
Oct 4, 2025
Merged

feat(markdown): add treeblood extensions for enhanced markdown parsing#146
yoonhyunwoo merged 1 commit into
gosuda:mainfrom
yoonhyunwoo:feature/treeblood-extensions

Conversation

@yoonhyunwoo

Copy link
Copy Markdown
Member

마크다운 수식 랜더링 익스텐션 추가

@yoonhyunwoo
yoonhyunwoo requested a review from Copilot October 4, 2025 09:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

Adds a math rendering (MathML) extension to the Goldmark markdown pipeline to enable formula parsing/rendering. Also introduces new markdown-related dependencies to go.mod.

  • Add goldmark-treeblood MathML extension into markdown renderer setup
  • Add new dependencies (goldmark-treeblood and treeblood) to go.mod

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
internal/markdown/parse.go Imports and registers treeblood MathML extension in the Goldmark configuration
go.mod Adds goldmark-treeblood and treeblood modules as (currently marked) indirect dependencies

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread go.mod
github.com/shopspring/decimal v1.4.0 // indirect
github.com/tdewolff/parse/v2 v2.8.3 // indirect
github.com/valyala/fastjson v1.6.4 // indirect
github.com/wyatt915/goldmark-treeblood v0.0.0-20250825231212-5dcbdb2f4b57 // indirect

Copilot AI Oct 4, 2025

Copy link

Choose a reason for hiding this comment

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

The module github.com/wyatt915/goldmark-treeblood is directly imported in internal/markdown/parse.go, so it should not be marked as // indirect. Remove the comment and run go mod tidy to reflect it as a direct dependency.

Suggested change
github.com/wyatt915/goldmark-treeblood v0.0.0-20250825231212-5dcbdb2f4b57 // indirect
github.com/wyatt915/goldmark-treeblood v0.0.0-20250825231212-5dcbdb2f4b57

Copilot uses AI. Check for mistakes.
@@ -122,6 +123,7 @@ var gMark = goldmark.New(
),
highlighting.WithGuessLanguage(true),
),

Copilot AI Oct 4, 2025

Copy link

Choose a reason for hiding this comment

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

Adding a new rendering capability (MathML) changes supported markdown features; consider adding a brief comment here (or updating higher-level markdown/rendering docs) to explain why MathML is enabled and any implications (e.g., output format expectations or security considerations if user-supplied content is rendered).

Suggested change
),
),
// Enable MathML rendering for mathematical expressions in markdown.
// MathML output allows rich math formatting, but note:
// - Output will include <math> elements, which may not be supported by all HTML consumers.
// - If user-supplied content is rendered, ensure proper sanitization to prevent XSS or other security issues.
// - See higher-level markdown/rendering docs for more details.

Copilot uses AI. Check for mistakes.
@yoonhyunwoo
yoonhyunwoo merged commit f96a3ad into gosuda:main Oct 4, 2025
@yoonhyunwoo
yoonhyunwoo deleted the feature/treeblood-extensions branch October 5, 2025 11:59
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