Skip to content

HTML comments break parsing of "Status:", "Decider:", "Date:" & "Tags:" fields #62

Description

@Philzen

Bug Report

Description

As soon as one starts filling out the "Deciders" or "Tags" section, any HTML comments start are showing up as such in the knowledge base (i.e. the <!-- optional --> comment).

Looking at the generated HTML, it transpires that:

  • The "Deciders" section renders the comment to &lt;!-- optional --&gt;
  • The Tags section renders the comment #&lt;!-- #optional #--&gt;

Steps to Reproduce

  1. create an ADR
  2. Fill out either "Deciders:" or "Tags"
    Actually: just putting an additional space between [list everyone involved in the decision] and <!-- optional --> is enough to trigger the behaviour
  3. Deploy or preview the knowledge base → the former HTML comments become visible

Expected Behavior

HTML comments should be ignored in generated output.

Environment

Log4brains version: 1.0.0-beta.11
Node.js version: v17.3.0.
OS and its version: Manjaro linux / whatever gitlab.com uses
Browser information: Firefox 96.0.2

Possible Solution

The parser that processes the "Deciders:" and "Tags:" section needs to be changed to recognize <!-- content --> and ignore them for processing (while still making them appear in the generated HTML output).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions