fix: preserve valid bold markdown in rich editor
This commit is contained in:
@@ -122,7 +122,17 @@ describe('compactMarkdown', () => {
|
||||
|
||||
it('decodes   HTML entities from BlockNote bold+code output', () => {
|
||||
const input = '**Remove **`NoteWindow`** and render the full **`App`** component.**\n'
|
||||
expect(compactMarkdown(input)).toBe('**Remove **`NoteWindow`** and render the full **`App`** component.**\n')
|
||||
expect(compactMarkdown(input)).toBe('**Remove** `NoteWindow` **and render the full** `App` **component.**\n')
|
||||
})
|
||||
|
||||
it('moves trailing whitespace outside bold markers', () => {
|
||||
const input = '**Luca **\n'
|
||||
expect(compactMarkdown(input)).toBe('**Luca** \n')
|
||||
})
|
||||
|
||||
it('moves leading whitespace outside bold markers', () => {
|
||||
const input = '** Luca**\n'
|
||||
expect(compactMarkdown(input)).toBe(' **Luca**\n')
|
||||
})
|
||||
|
||||
it('decodes multiple HTML entity types', () => {
|
||||
|
||||
Reference in New Issue
Block a user