Skip to content

[Bug] inline-code produces wrong markdown #1639

Open
@eliakocher

Description

@eliakocher

Initial checklist

  • I agree to follow the code of conduct
  • I searched issues and discussions and couldn’t find anything (or linked relevant results below)

Affected packages and versions

7.6.1

Link to runnable example

No response

Steps to reproduce

This can be tested in the Milkdown playground.

  1. Enter some text without whitespaces for example "InlineCodeWithBoldAndItalicText`"
  2. select the text and transform it in inline code
  3. select a word and make it bold or italic --> the produced markdown is wrong, bold and italic is missing
  4. edit the markdown --> in the editor, the `code` characters are visible, this is unexpected

example markdown:

`InlineCodeWith``Bold``And``Italic``Text`

Expected behavior

the markdown should be generated correctly with the bold and italic formatting:

`InlineCodeWith` **`Bold`** `And` *`Italic`* `Text`

editing the markdown should not change the editor in an unexpected way

Actual behavior

In the generated markdown the text formatting is missing but the code is splitted in chunks:

`InlineCodeWith``Bold``And``Italic``Text`

when you use text with whitespaces and select a word, it works correctly, for example "Inline Code With Bold And Italic Text"
when you use text without whitespaces, the produced markdown is wrong

Screenshot:
Image

Runtime

Chrome

OS

macOS

Build and bundle tools

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions