Tony Brix

Results 609 comments of Tony Brix
trafficstars

The marked parser is made to output HTML in string format but you don't have to use the output. The renderer functions could instead populate some object and output an...

A work around is to use ```js const marked = require('marked'); marked.setOptions(marked.getDefaults()); ``` to make sure that defaults are set to the initial defaults.

True. You could also send options as a second parameter to marked to override the defaults just for that call. ```js const marked = require('marked'); marked(markdown, marked.getDefaults()); ```

@calculuschild @styfle @joshbruce @davisjam what do you think about this approach? Is it too much to maintain? We could probably move more of the duplicate code to helpers.

@joshbruce ya the reason for the extra maintenance is because we have to maintain files that are *almost* the same just not quite. For instance anytime we fix a bug...

> I'm still a little skeptical that this change is needed at all. It seems like the "fetch image from CMS" use case can be solved with the current lexer...

after playing around with this a little bit it looks like we could just return the values from walkTokens and await those to do just about anything async. The async...

@vixalien Thanks for the push! 😉👍I had this almost done for a while. I changed this to use the suggestion by @styfle in https://github.com/markedjs/marked/pull/2474#issuecomment-1134040343. I made the `walkTokens` function return...

@bebraw nice catch. That start function should only look for `:` at the beginning of a line so it should be something like: ```js start(src: string) { return src.indexOf("\n:"); },...

@bebraw the start is needed to make sure the paragraph and text tokenizers doesn't consume too much. ``` hi :https//example.com: ``` For example, without the start function the above markdown...