Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Knowledge base crashes on HTML comment paragraphs #63

Open
Philzen opened this issue Jan 28, 2022 · 0 comments
Open

Knowledge base crashes on HTML comment paragraphs #63

Philzen opened this issue Jan 28, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@Philzen
Copy link
Contributor

Philzen commented Jan 28, 2022

Bug Report

Description

When any section of the MADR contains an HTML comment in a separate paragraph, the front end just crashes with "An unexpected error has occurred". Live reload seems to break down in that moment as the front end does not recover when the offending comment is reverted. A reload is required for it to work again.

Not reverting and navigating to the URL of another ADR also works, however the knowledge base will crash again when clicking on the ADR holding the offending HTML comment paragraph.

HTML comments beginning and ending at the end of a list entry or heading do not trigger this error.

Crashed knowledge base

image

Console error

image

Steps to Reproduce

  1. Create a new ADR
  2. Start up log4brains preview (can also be running already, does not matter)
  3. Move any of the comments in the template on their own paragraph, i.e. place the mouse course in front of <!-- optional -->, hit enter, and save the file.

Alternatively you can enter any HTML comment anywhere (except at the end of lists or headings) in an existing ADR.

Expected Behavior

The knowledge base should not crash.

Context

While drafting, I like to keep some of the initial comments found in square brackets in every template as a guideline for the team members that i am currently introducing to the ADR process, as i find them pretty well written and thus, helpful.

So i wanted to make them HTML comments that's how i discovered this behaviour.

Environment

Log4brains version: 1.0.0-beta.11
Node.js version: v17.3.0
OS and its version: Manjaro Linux
Browser information: Firefox 96.0.2 | Chromium 97.0.4692.99

Possible Solution

@Philzen Philzen added the bug Something isn't working label Jan 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant