You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Think i figured it out. Marked doesn't know what to do with literal \n like this:
marked('hello \world');
I think this is in fact a bug with Marked since in this example, native JSON.parse will convert that and to get it to work with Marked we'd have to go and add \n (the text, not literal) in place of it. What do think?
The text was updated successfully, but these errors were encountered:
There is no such thing as literal or non-literal newlines/line-feeds at runtime. Newlines are just bytes at runtime.
Your line feed there is being escaped by the backslash, which is why you're able to (syntactically) create a multiple-line string. A newline is not actually added to the string because it had to be escaped in order to do that. It's just a syntactic feature of javascript.
Re: OscarGodson/EpicEditor#75
Think i figured it out. Marked doesn't know what to do with literal
\n
like this:I think this is in fact a bug with Marked since in this example, native
JSON.parse
will convert that and to get it to work with Marked we'd have to go and add\n
(the text, not literal) in place of it. What do think?The text was updated successfully, but these errors were encountered: