Syntax Processing
Syntax Processing
The streaming syntax processing mechanism is designed for real-time rendering scenarios, intelligently handling incomplete Markdown syntax structures to avoid rendering anomalies caused by syntax fragments.
| Parameter | Description | Type | Default Value |
|---|---|---|---|
| hasNextChunk | Whether there is subsequent data | boolean | false |
| enableAnimation | Enable text fade-in animation | boolean | false |
| animationConfig | Text animation configuration | AnimationConfig | { fadeDuration: 200, easing: 'ease-in-out' } |
During streaming transmission, Markdown syntax may be in an incomplete state:
// Incomplete link syntax [Example Website](https://example // Incomplete image syntax  | Detect unclosed link markers, such as [text]( |
| Image |  | Detect unclosed image markers, such as  => <span className="loading-link">🔗 Loading...</span>,ImageLoading: () => <div className="loading-image">🖼️ Image loading...</div>,};const App = () => {return (<XMarkdowncontent="Visit [Ant Design](https://ant.design) for documentation"streaming={{hasNextChunk: true,incompleteMarkdownComponentMap: {link: 'link-loading',image: 'image-loading',},}}components={{'link-loading': CustomLoadingComponents.LinkLoading,'image-loading': CustomLoadingComponents.ImageLoading,}}/>);};