Timeline Diagram Comment Inconsistencies #5356
Labels
Status: Triage
Needs to be verified, categorized, etc
Type: Bug / Error
Something isn't working or is incorrect
Description
Inside of the
timeline.jison
parser file, there are two ways of declaring comments: either you use the double percentage sign%%
defined on line 14 or you use a singular hashtag#
defined on line 18. If you use the hashtag method while writing within an event element, it will treat everything that comes after it as a comment. However, the double percentage method isn't treated this way. It's rendered despite being highlighted green within Mermaid live indicating its comment status. Additionally, the hashtag method isn't highlighted green which causes some visual confusion because a green highlight seems to indicate a comment.Steps to reproduce
Screenshots
Code Sample
No response
Setup
Suggested Solutions
A good solution would make alterations to the
timeline.jison
file so that hashtag/percent comments are both treated the same way. It's my personal belief that maybe hashtags should be required to be double##
(similar to Python). That way users could potentially use hashtag symbols in their titles, sections, periods, and event elements so long as they aren't two consecutive hashtag symbols. Admittedly, this would require extra effort as the regexs for the timeline, section, period, event, and other parts of the lexical definitions will need to be altered to support this change.Additional Context
No response
The text was updated successfully, but these errors were encountered: