Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

Underlined headers displayed incorrectly #57

Closed
pierreporte opened this issue Apr 5, 2016 · 3 comments
Closed

Underlined headers displayed incorrectly #57

pierreporte opened this issue Apr 5, 2016 · 3 comments

Comments

@pierreporte
Copy link

The level 1 and 2 titles, when created using an underlining row of = or -, are not displayed correctly. The actual text of the title remains in the common style and is not enlarged. Below is a screenshot.

selection_516

@brrd
Copy link
Owner

brrd commented Apr 5, 2016

Actually this issue is difficult to fix properly because of CodeMirror parser design (it goes line after line and can not go back to a previous line). In my opinion, this syntax is a tricky feature of markdown which should be avoided whenever possible because it's much harder to handle than the classical # expression (regardless of the parsing system). But I agree that it is important to provide support for it.

Abricotine already supports this syntax in the table of content (here). We need a new method independent of CodeMirror's parser to parse the content and correct this on editor change.

@brrd brrd changed the title Underlined titles displayed incorrectly Underlined headers displayed incorrectly Nov 23, 2016
@brrd
Copy link
Owner

brrd commented Jan 5, 2017

Related feature request in CodeMirror: codemirror/codemirror5#839

A workaround here: codemirror/codemirror5#2143 (comment) (but we must check performance on large documents).

@brrd
Copy link
Owner

brrd commented Jun 22, 2017

CodeMirror 5.27.0 now features a new StringStream.lookahead method which can help fixing this. IMO the best solution would be to fix the markdown mode directly into CodeMirror.

brrd added a commit that referenced this issue Oct 5, 2017
@brrd brrd closed this as completed in 93319ac Oct 7, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants