feat: custom gfm plugin for gt-remark #938
Merged
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.
Greptile Overview
Greptile Overview
Greptile Summary
This PR adds a custom GitHub Flavored Markdown (GFM) plugin to the
gt-remarkpackage by implementingremarkGfmCustom. The plugin registers GFM extensions for strikethrough, tables, task lists, and footnotes.Key Changes:
remarkGfmCustomplugin that configures micromark and mdast extensions for GFM featuresremarkGfmCustomalongside existingescapeHtmlInTextNodespluginIssues Found:
remarkGfmCustomplugin - no verification it works correctlyConfidence Score: 3/5
remarkGfmCustomplugin has zero test coverage, making it impossible to verify it works correctly with strikethrough, tables, task lists, and footnotes. The existingescapeHtmlInTextNodeshas comprehensive tests, but the new plugin needs similar coverage.packages/remark/src/index.ts- the new plugin needs testing before production useImportant Files Changed
File Analysis
Sequence Diagram
sequenceDiagram participant User participant Unified as Unified Processor participant Plugin as remarkGfmCustom participant Data as Processor Data participant Extensions as GFM Extensions User->>Unified: .use(remarkGfmCustom) Unified->>Plugin: Call plugin function Plugin->>Data: Access this.data() Plugin->>Data: Initialize extension arrays Plugin->>Extensions: Load micromark extensions Extensions-->>Plugin: gfmStrikethrough, gfmTable, etc. Plugin->>Data: Push to micromarkExtensions Plugin->>Extensions: Load from/to markdown utils Extensions-->>Plugin: gfmStrikethroughFromMarkdown, etc. Plugin->>Data: Push to fromMarkdownExtensions Plugin->>Data: Push to toMarkdownExtensions Plugin-->>Unified: Extensions registered Unified->>User: Processor ready with GFM supportImportant Files Changed
File Analysis
Sequence Diagram
sequenceDiagram participant User participant Unified as Unified Processor participant Plugin as remarkGfmCustom participant Data as Processor Data participant Extensions as GFM Extensions User->>Unified: .use(remarkGfmCustom) Unified->>Plugin: Call plugin function Plugin->>Data: Access this.data() Plugin->>Data: Initialize extension arrays Plugin->>Extensions: Load micromark extensions Extensions-->>Plugin: gfmStrikethrough, gfmTable, etc. Plugin->>Data: Push to micromarkExtensions Plugin->>Extensions: Load from/to markdown utils Extensions-->>Plugin: gfmStrikethroughFromMarkdown, etc. Plugin->>Data: Push to fromMarkdownExtensions Plugin->>Data: Push to toMarkdownExtensions Plugin-->>Unified: Extensions registered Unified->>User: Processor ready with GFM support