Skip to content

[Bug]: Markdown editor does not support numeric superscript footnotes #8075

Closed

Description

@ppmagi

English (translated)

Operating system

Windows

Orca version

No response

Details

Syntax like <sup><a href="...">[12]</a></sup> (numeric superscript footnotes / reference links) does not appear to be supported in Orca's Markdown editor.

Example form:

<sup><a href="https://www.sci-gz.com/jtyw/jr/226.html">[12]</a></sup>
Image

Original (zh-CN) — source of truth

Original title: [Bug]: markdown编辑器语法不支持数字上标脚注

Operating system

Windows

Orca version

No response

Details

[12],这种语法,目前在orca的md编辑器好像不支持。

Image

Activity

  1. added theissue type on Jul 12, 2026
  2. changed the title [-][Bug]: markdown编辑器语法不支持数字上标脚注[/-] [+][Bug]: Markdown editor does not support numeric superscript footnotes[/+] on Jul 16, 2026
  3. nwparker commented on Jul 18, 2026

    @nwparker
    Contributor

    Status: NOT REPRODUCED (fixed in current tree)

    Numeric superscript footnote syntax like <sup><a href="...">[12]</a></sup> is now supported. PR #8307 (feat(markdown): support HTML superscript links, merged 2026-07-11) added a first-class rich-Markdown node (rich-markdown-html-superscript-link.ts) that matches narrow <sup><a>label</a></sup> citations and renders them as compact atoms, and it's enabled in the production editor (useRichMarkdownEditorInstance.ts:15, rich-markdown-editor-config.ts:132). The read-only preview already kept sub/sup in its rehype-sanitize schema (MarkdownPreview.tsx:295).

    A verification test drives the real pipeline with the production flag on and confirms the exact reported fragment parses into a citation node (label [12], correct href) and round-trips byte-for-byte:

    pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/editor/repro-8075-superscript-footnote.test.ts
    

    Result: 1 passed. Recommend closing as resolved by #8307.

    Key files: rich-markdown-html-superscript-link.ts, rich-markdown-html-superscript-link-source.ts, useRichMarkdownEditorInstance.ts, MarkdownPreview.tsx.


    Automated bug-reproduction pass. Repro artifact committed on branch nwparker/bug-repro-pass2; check it out to run the command above. Writeup: docs/bug-reproductions/8075.md.

  4. added
    pending_reproRepro attempted; still pending conclusive reproduction
    on Jul 18, 2026
  5. OrcaWin commented on Jul 18, 2026

    @OrcaWin
    Collaborator

    Attempted — could not reproduce as a rendering bug; likely surface-specific (needs a clarification)

    The Markdown preview sanitizer explicitly allows the tags in your example. In src/renderer/src/components/editor/MarkdownPreview.tsx:295 the schema is:

    tagNames: [...(defaultSchema.tagNames ?? []), 'details', 'summary', 'kbd', 'sub', 'sup', 'ins'],

    and a keeps href/title (:307) with file/http(s) protocols allowed. So <sup><a href="https://...">[12]</a></sup> should render as a superscript link in the rendered preview.

    That means the failure is probably surface-specific, and I can't pin it without knowing which one you're looking at:

    • Source/plain-text editor showing the raw <sup>...</sup> as literal text is expected — that pane shows Markdown source, not rendered HTML.
    • If the rendered preview drops it, that's the reproducible bug — but the sanitizer above suggests it shouldn't.

    Could you confirm: (1) are you in the source editor or the rendered preview? (2) does the tag disappear entirely, render as plain (non-superscript) text, or render but without the link? (3) an Orca version. A screenshot of the rendered view plus the exact source would let this be reproduced precisely.

    🔁 Attempted via automated Windows bug-reproduction pass — marking cannot_repro pending the surface clarification above.

  6. nwparker commented on Aug 23, 2026

    @nwparker
    Contributor

    Closing because superscript footnotes were fixed in PR #8307.
    Disagree? Please respond! I will re-visit this ticket in 5 days. If you respond, I will re-open it 🙏.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingos:Windowspending_reproRepro attempted; still pending conclusive reproduction

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions