-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Package
@sylphx/synth-md-gfm@0.2.3
Environment
@sylphx/synth-md: latestbun: 1.3.3- Platform: macOS arm64
Description
GFM tables are not being parsed as table nodes. Instead, they are parsed as paragraph nodes when using the gfmPlugin().
Steps to Reproduce
import { parse } from '@sylphx/synth-md'
import { gfmPlugin } from '@sylphx/synth-md-gfm'
const md = `# Heading
| col1 | col2 |
|------|------|
| a | b |
Text after.
`
const tree = parse(md, { plugins: [gfmPlugin()] })
tree.nodes.forEach((n, i) => console.log(`${i}: ${n.type}`))Expected Output
0: root
1: heading
2: text
3: table <-- should be table
4: paragraph
5: text
Actual Output
0: root
1: heading
2: text
3: paragraph <-- table parsed as paragraph
4: text
Additional Context
gfmPluginexports:gfmPlugin,tryTokenizeAutolink,tryTokenizeStrikethrough,tryTokenizeTable- Tested with various table formats (with/without alignment, different spacing)
- Strikethrough and autolinks not tested but may have similar issues
Impact
This blocks GFM table support in @sylphx/coderag for semantic code chunking.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels