ngx-markdown icon indicating copy to clipboard operation
ngx-markdown copied to clipboard

Marked 11.0.0 support (Error: renderer 'options' does not exist)

Open kle-pra opened this issue 1 year ago • 5 comments

Marked 11.0.0 was released and it doesn't work with latest ngx-markdown 17.1.1:

I am getting the following runtime error in browser when trying to render some simple markdown:

 <markdown 
ngPreserveWhitespaces
ngNonBindable>
  ```html
     TEST
  ```
 </markdown>
core.mjs:11752 ERROcore.mjs:11752 ERROR Error: renderer 'options' does not exist
    at marked.esm.js:2165:31
    at Array.forEach (<anonymous>)
    at Marked.use (marked.esm.js:2097:14)
    at marked.use (marked.esm.js:2357:20)
    at MarkdownService.parseMarked (ngx-markdown.mjs:293:20)
    at MarkdownService.parse (ngx-markdown.mjs:186:29)
    at ngx-markdown.mjs:533:51
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (asyncToGenerator.js:3:1)
    at _next (asyncToGenerator.js:22:1)R Error: renderer 'options' does not exist
    at marked.esm.js:2165:31
    at Array.forEach (<anonymous>)
    at Marked.use (marked.esm.js:2097:14)
    at marked.use (marked.esm.js:2357:20)
    at MarkdownService.parseMarked (ngx-markdown.mjs:293:20)
    at MarkdownService.parse (ngx-markdown.mjs:186:29)
    at ngx-markdown.mjs:533:51
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (asyncToGenerator.js:3:1)
    at _next (asyncToGenerator.js:22:1)

It works fine with marked v10.0.0, even though I see now 9.0.0 is supported officially with ngx-markdown

Best Regards

kle-pra avatar Nov 29 '23 08:11 kle-pra

Same here.. same issue.

fexxdev avatar Dec 04 '23 14:12 fexxdev

That is because marked 11 is not yet supported as indicated by the peer dependencies

https://github.com/jfcere/ngx-markdown/blob/990942bbe502151743279db4efdada33e0f0c568/lib/package.json#L32-L39

jfcere avatar Dec 04 '23 15:12 jfcere

For information, I plan to update eventually, but there is not much changes between v9 and v11 (see marked releases notes here: https://github.com/markedjs/marked/releases).

jfcere avatar Jan 09 '24 23:01 jfcere

Any plans to make new release?

tarlepp avatar Jan 12 '24 07:01 tarlepp

For information, I plan to update eventually, but there is not much changes between v9 and v11

yes but when upgrade to v11 ngx-markdown not working

sysmat avatar Jan 18 '24 06:01 sysmat

The library has been updated to support marked >= 9.0.0 < 13.0.0. Please update ngx-mardown to v17.2.0.

jfcere avatar Mar 31 '24 00:03 jfcere