Skip to content

Commit 7adbc2c

Browse files
authored
Update README.md
1 parent d4108e7 commit 7adbc2c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -613,21 +613,19 @@ import type { MarkdownToJSX } from 'markdown-to-jsx'
613613
// Get the AST directly
614614
const ast = compiler('# Hello world', { ast: true })
615615
616-
// TypeScript: AST is MarkdownToJSX.AST[]
616+
// TypeScript: AST is MarkdownToJSX.ASTNode[]
617617
console.log(ast) // Array of parsed nodes with types
618618
619619
// You can manipulate, transform, or analyze the AST before rendering
620620
```
621621
622-
The AST format is `MarkdownToJSX.AST[]` and enables:
622+
The AST format is `MarkdownToJSX.ASTNode[]` and enables:
623623
624624
- AST manipulation and transformation
625625
- Custom rendering logic without re-parsing
626626
- Caching parsed AST for performance
627627
- Linting or validation of markdown structure
628628
629-
When footnotes are present, the returned value will be an object with `ast` and `footnotes` properties instead of just the AST array.
630-
631629
### Syntax highlighting
632630
633631
When using [fenced code blocks](https://www.markdownguide.org/extended-syntax/#syntax-highlighting) with language annotation, that language will be added to the `<code>` element as `class="lang-${language}"`. For best results, you can use `options.overrides` to provide an appropriate syntax highlighting integration like this one using `highlight.js`:

0 commit comments

Comments
 (0)