#6482·Zettlr

Blockquote containing rendered math shows duplicate vertical bars

Author: owentCreated Jul 30, 2026Updated Sep 7, 2026
Labelsbug

Description

When a blockquote contains an inline math equation, the editor draws the quote's vertical bar twice even though the quote has a single > marker. Reproduction (preview mode with "Render emphasis" and "Render formulae" enabled):

Reproducing

Use the markdown below.

markdown
> **Bold**:

> **Bold**: $\phi(x)=\operatorname{elu}(x)+1$

It show like this.

Image

Zettlr version

Zettlr 4.6.0/4.7.0

Installation Method

From the Website or GitHub

Installation Method (Other)

No response

Your Platform

  • Windows
  • macOS
  • Linux

Architecture

  • Intel 64bit
  • ARM 64bit (includes Apple Silicon)

Operating System Version

Windows 11

Additional Information

Analysis: renderBlockquotes (source/common/modules/markdown-editor/renderers/render-blockquotes.ts) iterates over view.visibleRanges and pushes one BlockWrapper per Blockquote node it encounters. Rendered widgets (e.g. KaTeX math) split view.visibleRanges into fragments, so a Blockquote spanning a widget is visited once per fragment, producing duplicate identical wrapper ranges that CodeMirror renders as nested blockquote-wrapper elements — hence multiple bars for a single-level quote. Deduplicating the ranges (e.g. by line.from + '-' + node.to) before creating the wrappers fixes it.