Skip to content

Inline code marks allow other marks applied to their content #231

@b-kelly

Description

@b-kelly

Describe the bug

Typing underscores into an inline code mark cause the text to be (incorrectly) italicized. The commonmark reference dingus shows that underscores inside a code span are not rendered as emphasis. In the following screenshot, notice that there are three code elements, with the center one wrapped in an emphasis element. This only happens in rich-text mode while using input commands (and not during round-trip markdown conversion).

image

To Reproduce
Steps to reproduce the behavior:

  1. Switch to the rich-text editor
  2. Open a new code block via any method (e.g. clicking the menu button)
  3. Type the following text into the inline code mark: a_b_c
  4. See that the underscores disappear and the middle character is italicized

Something else to note is that the rich-text mode seems to allow other marks inside the code mark (e.g. emphasis menu button is enabled). I'd imagine that merely fixing the schema would solve all of our issues here.

Expected behavior
Code marks should disallow all other marks applied to their content. This includes marks from any source - input commands, menu commands, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmode - rich textAffects the editor's rich text (wysiwyg) mode

    Type

    No type

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions