Skip to content
New issue

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

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

Open
b-kelly opened this issue Oct 31, 2022 · 0 comments
Open

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

b-kelly opened this issue Oct 31, 2022 · 0 comments
Labels
bug Something isn't working mode - rich text Affects the editor's rich text (wysiwyg) mode
Milestone

Comments

@b-kelly
Copy link
Collaborator

b-kelly commented Oct 31, 2022

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.

@b-kelly b-kelly added bug Something isn't working mode - rich text Affects the editor's rich text (wysiwyg) mode labels Oct 31, 2022
@b-kelly b-kelly added this to the Beta 3 milestone Oct 31, 2022
@b-kelly b-kelly moved this to Todo in Stacks-Editor Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working mode - rich text Affects the editor's rich text (wysiwyg) mode
Projects
Status: Todo
Development

No branches or pull requests

1 participant