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

Issue with comment in MD file #81

Open
mangoldd opened this issue Jul 15, 2022 · 2 comments
Open

Issue with comment in MD file #81

mangoldd opened this issue Jul 15, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@mangoldd
Copy link

Bug Report

Description

I had some issues with comments.

Steps to Reproduce

Observation 1)

Put this comment at the end of any MD file:
<!-- Chosen option: "Log4brains", because it includes the features of all the other tools, and even more. -->

I get this error message in the previewer
An unexpected error has occurred.

framework.5ab3178105b977ab7f59.js:1 TypeError: Cannot read properties of null (reading 'type')
at xa (45d2d314fc8da5e3d79852782e4a432ad4da6771.744cf221144f0adb686a.js:1:911930)
at 45d2d314fc8da5e3d79852782e4a432ad4da6771.744cf221144f0adb686a.js:1:912391
at framework.5ab3178105b977ab7f59.js:1:4353
at framework.5ab3178105b977ab7f59.js:1:3787
at P (framework.5ab3178105b977ab7f59.js:1:2919)
at P (framework.5ab3178105b977ab7f59.js:1:3332)
at N (framework.5ab3178105b977ab7f59.js:1:3753)
at Object.forEach (framework.5ab3178105b977ab7f59.js:1:4335)
at 45d2d314fc8da5e3d79852782e4a432ad4da6771.744cf221144f0adb686a.js:1:912368
at Ma (45d2d314fc8da5e3d79852782e4a432ad4da6771.744cf221144f0adb686a.js:1:912478)
uu @ framework.5ab3178105b977ab7f59.js:1
main-319220bbc2fa7828d1ea.js:1 TypeError: Cannot read properties of null (reading 'type')
at xa (45d2d314fc8da5e3d79852782e4a432ad4da6771.744cf221144f0adb686a.js:1:911930)
at 45d2d314fc8da5e3d79852782e4a432ad4da6771.744cf221144f0adb686a.js:1:912391
at framework.5ab3178105b977ab7f59.js:1:4353
at framework.5ab3178105b977ab7f59.js:1:3787
at P (framework.5ab3178105b977ab7f59.js:1:2919)
at P (framework.5ab3178105b977ab7f59.js:1:3332)
at N (framework.5ab3178105b977ab7f59.js:1:3753)
at Object.forEach (framework.5ab3178105b977ab7f59.js:1:4335)
at 45d2d314fc8da5e3d79852782e4a432ad4da6771.744cf221144f0adb686a.js:1:912368
at Ma (45d2d314fc8da5e3d79852782e4a432ad4da6771.744cf221144f0adb686a.js:1:912478)

Observation 2)

Sometimes I was just putting the possible statuses as comment afterwards.
- Status: accepted <!-- [draft | proposed | rejected | accepted | deprecated | … | superseded by [xxx](yyyymmdd-xxx.md)] -->

This renders in the previewer surprisingly to "Draft" (and not accepted as it would be if the comment is removed).

Expected Behavior

Comment is ignored.

Context

log4brains preview
Looking at rendered pages in the previewer.

Environment

  • Log4brains version: 1.0.0-beta.13
  • Node.js version: v14.18.1
  • OS and its version: Windows 10
  • Browser information: Chrome
@mangoldd mangoldd added the bug Something isn't working label Jul 15, 2022
@tylerhubert
Copy link

I've just opened #97 to fix Observation number 2 reported in this issue. I also wanted to keep the possible statuses in an inline comment after the status.

@daviddob
Copy link

Can confirm I am seeing the same behavior if the document ends in an HTML comment, I commented out the links section and it then failed to render with the same error

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

3 participants