nextcloud / nextcloud/text

Support custom heading-ids and overriding heading id prefix

Open
#7,285 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop enhancement format: markdown
Dominant language
JavaScript
Stars
659
Forks
133
Avg merge
1d 20h
Merged PRs (30d)
110

Description

Is your feature request related to a problem? Please describe.
Currently, heading IDs are prefixed with an h-, implemented here, https://github.com/nextcloud/text/pull/3795, to address naming conflicts reported for headings with Nextcloud, and maybe others.

Rendering does not seem to respect or register custom heading IDs via the {#heading-id} syntax, https://www.markdownguide.org/extended-syntax/#heading-ids.

This way of working around naming conflicts breaks link rendering in my markdown editor when I do local editing (vscodium editor). Because the prefix is hardcoded and custom ids are not respected, I cannot utilize the inter-document links in both editors. I have to chose one or the other, losing functionality either way.

Describe the solution you'd like
Supporting custom heading ids would allow me to set consistent heading links across my editors and allow me to manually address naming conflicts that work with my documents.

Describe alternatives you've considered
Accept the broken links.

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

Start by reviewing the heading ID implementation linked in the issue and the editor's handling of Markdown heading syntax. Done means {#heading-id} values are respected, the h- prefix can be overridden, and links remain consistent with VSCodium editing.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, markdown
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.