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

TypeError: this.renderer.html is not a function (Error in 0.8.1, OK in 0.8.0) #1621

Closed
kozi opened this issue Mar 19, 2020 · 4 comments · Fixed by #1622 or #1624
Closed

TypeError: this.renderer.html is not a function (Error in 0.8.1, OK in 0.8.0) #1621

kozi opened this issue Mar 19, 2020 · 4 comments · Fixed by #1622 or #1624
Labels
category: headings L1 - broken Valid usage causes incorrect output OR a crash AND there is no known workaround for the issue

Comments

@kozi
Copy link

kozi commented Mar 19, 2020

Describe the bug

Bug in 0.8.1. In version 0.8.0 everything works fine.

(node:17048) UnhandledPromiseRejectionWarning: TypeError: this.renderer.html is not a function
Please report this to https://github.com/markedjs/marked.
    at InlineLexer.output (C:\Users\XYZ\workspace\node_modules\marked\src\InlineLexer.js:85:30)
    at Parser.tok (C:\Users\XYZ\workspace\node_modules\marked\src\Parser.js:97:36)
    at Parser.parse (C:\Users\XYZ\workspace\node_modules\marked\src\Parser.js:47:19)
    at Function.parse (C:\Users\XYZ\workspace\node_modules\marked\src\Parser.js:30:19)
    at marked (C:\Users\XYZ\workspace\node_modules\marked\src\marked.js:103:19)
@kozi kozi changed the title TypeError: this.renderer.html is not a function TypeError: this.renderer.html is not a function (Error in 0.8.1, OK in 0.8.0) Mar 19, 2020
@UziTech
Copy link
Member

UziTech commented Mar 19, 2020

What markdown are you sending to marked?

@UziTech
Copy link
Member

UziTech commented Mar 19, 2020

The easiest way for us to debug is to provide a link to a demo that demonstrates the error.

yaacovCR added a commit to yaacovCR/graphql-tools-fork that referenced this issue Mar 20, 2020
@kozi
Copy link
Author

kozi commented Mar 20, 2020

This code leads to the error:

## internal header <!-- internal -->

Anmerkung 2020-03-20 120829

While this code for example works:

* line one
* line two <!-- internal -->
* line three <!-- internal -->
* line four

@styfle styfle added category: headings L1 - broken Valid usage causes incorrect output OR a crash AND there is no known workaround for the issue and removed need more info labels Mar 20, 2020
@styfle
Copy link
Member

styfle commented Mar 20, 2020

Thanks! I confirmed this is a regression in 0.8.1 and works correctly in 0.8.0.

Any html comment in a heading causes the error, the simplest markdown being:

# <!---->

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: headings L1 - broken Valid usage causes incorrect output OR a crash AND there is no known workaround for the issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants