ts-stack/markdown

this.options.escape is not a function

larryeby opened this issue · 1 comments

Received an error while trying some more complicated markdown rendering.

Message: this.options.escape is not a function Please report this to https://github.com/KostyaTretyak/marked-ts
Exception type: TypeError
Failed method: Renderer.code

Stack:

TypeError:
   at Renderer.code (at Renderer.code (/home/site/wwwroot/dist/server.js:78487:69)at Renderer.code (/home/site/wwwroot/dist/server.js:78487:69): /home/site/wwwroot/dist/server.jsat Renderer.code (/home/site/wwwroot/dist/server.js:78487:69): 78487)
   at Parser.tok (at Parser.tok (/home/site/wwwroot/dist/server.js:78392:42)at Parser.tok (/home/site/wwwroot/dist/server.js:78392:42): /home/site/wwwroot/dist/server.jsat Parser.tok (/home/site/wwwroot/dist/server.js:78392:42): 78392)
   at Parser.parse (at Parser.parse (/home/site/wwwroot/dist/server.js:78314:25)at Parser.parse (/home/site/wwwroot/dist/server.js:78314:25): /home/site/wwwroot/dist/server.jsat Parser.parse (/home/site/wwwroot/dist/server.js:78314:25): 78314)
   at Function.Parser.parse (at Function.Parser.parse (/home/site/wwwroot/dist/server.js:78307:23)at Function.Parser.parse (/home/site/wwwroot/dist/server.js:78307:23): /home/site/wwwroot/dist/server.jsat Function.Parser.parse (/home/site/wwwroot/dist/server.js:78307:23): 78307)
   at Function.Marked.callParser (at Function.Marked.callParser (/home/site/wwwroot/dist/server.js:78256:36)at Function.Marked.callParser (/home/site/wwwroot/dist/server.js:78256:36): /home/site/wwwroot/dist/server.jsat Function.Marked.callParser (/home/site/wwwroot/dist/server.js:78256:36): 78256)
   at Function.Marked.parse (at Function.Marked.parse (/home/site/wwwroot/dist/server.js:78202:25)at Function.Marked.parse (/home/site/wwwroot/dist/server.js:78202:25): /home/site/wwwroot/dist/server.jsat Function.Marked.parse (/home/site/wwwroot/dist/server.js:78202:25): 78202)
   at renderMarkdown (at renderMarkdown (/home/site/wwwroot/dist/server.js:77732:61)at renderMarkdown (/home/site/wwwroot/dist/server.js:77732:61): /home/site/wwwroot/dist/server.jsat renderMarkdown (/home/site/wwwroot/dist/server.js:77732:61): 77732)
   at contentSection.item.data.contentSection.item.data.contentSection.map.section (at contentSection.item.data.contentSection.item.data.contentSection.map.section (/home/site/wwwroot/dist/server.js:79220:116)at contentSection.item.data.contentSection.item.data.contentSection.map.section (/home/site/wwwroot/dist/server.js:79220:116): /home/site/wwwroot/dist/server.jsat contentSection.item.data.contentSection.item.data.contentSection.map.section (/home/site/wwwroot/dist/server.js:79220:116): 79220)
   at mapCommunicationArticle (at mapCommunicationArticle (/home/site/wwwroot/dist/server.js:79217:77)at mapCommunicationArticle (/home/site/wwwroot/dist/server.js:79217:77): /home/site/wwwroot/dist/server.jsat mapCommunicationArticle (/home/site/wwwroot/dist/server.js:79217:77): 79217)

The offending markdown (but with three backticks):

`` 
{
  "firstName": "John",
  "lastName": "Smith",
  "age": 25
}
`` 

Hi, @larryeby. Can you give more detail about your code? Maybe this issue can help.