Skip to content

Copy icon appears incorrectly for code blocks within blockquotes #24

@alexey-skoblin

Description

@alexey-skoblin

Issue Description:

Expected Behavior:

  • The copy icon should not appear for code blocks that are nested within blockquotes.

Actual Behavior:

  • The copy icon is erroneously added to each line of the code block, even though it's part of a blockquote.
  • When a code block is at the end of a blockquote, the copy icon may render outside the blockquote's visual boundary, leading to a misaligned and "broken" appearance.

Steps to Reproduce:

1. Create a new note in Obsidian.

2. Add a blockquote that contains an inline code block or a fenced code block.

3. Example 1 The copy icon appears on each line when editing.

```markdown
> [!note]+ Сообщение от Алексей
> **Дата:** {date} {time}
> **Сообщение:**
> ```text
> 18:39
> ```
>
```
Image Image

4. Example 2 The copy icon is displayed after the blockquote on the next line.

```markdown
> [!note]+ Сообщение от Алексей
> **Дата:** {date} {time}
> **Сообщение:**
> ```text
> 18:39
> ```
>
```
Image Image

5. Observe the behavior in edit mode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions