We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mdast-util-to-markdown@2.1.2
const mdast = { type: 'root', children: [ { type: 'paragraph', children: [ { type: 'text', value: '💡', position: { start: { line: 8, column: 10, offset: 113 }, end: { line: 8, column: 12, offset: 115 } } }, { type: 'strong', children: [ { type: 'text', value: ' Some tex', position: { start: { line: 8, column: 20, offset: 123 }, end: { line: 8, column: 29, offset: 132 } } } ], position: { start: { line: 8, column: 12, offset: 115 }, end: { line: 8, column: 38, offset: 141 } } }, { type: 'text', value: 't', position: { start: { line: 8, column: 38, offset: 141 }, end: { line: 8, column: 39, offset: 142 } } } ], position: { start: { line: 8, column: 7, offset: 110 }, end: { line: 8, column: 43, offset: 146 } } } ], position: { start: { line: 1, column: 1, offset: 0 }, end: { line: 12, column: 1, offset: 176 } } } const md = toMarkdown(mdast) console.log('md:', md)
��** Some tex**t
💡** Some tex**t
node@23.6.1
npm@10.9.2
macOS Sequoia 15.3.1
No response
The text was updated successfully, but these errors were encountered:
In container-phrasing.js, it uses slice() many times, but it can break emojis. A workaround would be to use Array.from, something like:
container-phrasing.js
slice()
Array.from
> Array.from('👩👩👧👦') [ '👩', '', '👩', '', '👧', '', '👦' ] > '👩👩👧👦'.split('') [ '\ud83d', '\udc69', '', '\ud83d', '\udc69', '', '\ud83d', '\udc67', '', '\ud83d', '\udc66' ] > '👩👩👧👦'.slice(-1) '\udc66' > Array.from('👩👩👧👦').slice(-1).toString() '👦' >
Sorry, something went wrong.
No branches or pull requests
Initial checklist
Affected package
mdast-util-to-markdown@2.1.2
Steps to reproduce
Actual behavior
Expected behavior
Runtime
node@23.6.1
Package manager
npm@10.9.2
Operating system
macOS Sequoia 15.3.1
Build and bundle tools
No response
The text was updated successfully, but these errors were encountered: