Skip to content

bug(md-editor) Pasting in code within a fenced code block, creates 2nd inner code block #215

@KyleMit

Description

@KyleMit

Describe the bug
In the markdown editor, when pasting code into a pre-existing fenced code block, a second code block is created inside.

To Reproduce
Steps to reproduce the behavior:

  1. Open md editor

  2. Create fenced code block ```

  3. Paste anything detected as code into block - ex: copy the text below:

    var x = 1
    

Expected behavior
Only the single (existing) fenced region is used

Screenshots
paste-code-into-code

This will also render incorrectly if saved without manually fixing:

image

Desktop

  • OS: Windows
  • Browser: Chrome
  • Version: v104

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestmode - markdownAffects the editor's markdown input mode

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions