StackExchange / StackExchange/Stacks-Editor

bug(markdown) removing block quote on fenced code section doesnt remove blockquotes on fence lines

Open
#184 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug good first issue mode - markdown
Dominant language
TypeScript
Stars
437
Forks
61
Avg merge
16h 2m
Merged PRs (30d)
8

Description

Describe the bug
In MD, when removing a block quote from a fenced code section, it only removes the opening > chars from the content lines, but not from the code fence lines.

Works fine in RT mode.

To Reproduce
Steps to reproduce the behavior:

  1. Go to MD, add in this content:
```
Some code
```
  1. select all, ctrl-q to apply blockquote, ctrl-q to remove blockquote
  2. Now looks like this
>```
Some code
>```

Expected behavior
Should look like this:

```
Some code
```

Desktop (please complete the following information):
Windows 11 Chrome 103

Additional context
https://meta.stackexchange.com/a/380331/51

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce this in the Markdown editor using a fenced code block, select all, and press ctrl-q twice. Trace the blockquote-removal entry point for Markdown and verify that the opening and closing fence lines lose their > prefixes along with the content lines; done when the result matches the expected unquoted fence.

Written by the indexing model from the issue text.

Assessment

Tech stack
markdown, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.