Open joshbruce opened 6 years ago
I would think most users would expect commonmark compliance therefore gfm and pedantic should be options but the default would be commonmark
Having pedantic
and gfm
as flags still runs into the same issue of cross-flagging and could add some bloat to the code to account for it. Maybe:
{
flavor: commonmark|gfm|daring
}
From a UX perspective, trying to take the cognitive load off the user. Seems most of our users are thinking GFM is the default. (Note: I haven't gone through all the options yet to figure out what they do exactly, will definitely try to before we get much closer to 1.x.)
Note: Looking to deprecate the flag entirely.
Somewhat related, I'm going to be using this to render for reddit posts, so options like this would be super useful.
Marked version: 0.3.19
Markdown flavor: all
Proposal type: other
What pain point are you perceiving?
How many licks? and too many flavors.
Right now Marked supports, in theory, the following flavors and specifications:
Marked only allows choosing flavors through the options in the following manner, in theory:
{ pendantic: true, gfm: true|false }
{ pedantic: false, gfm: false }
{ pedantic: false, gfm: true }
By default, Marked uses GFM. Having said that, there are options to turn off functionality afforded by GFM (
{ tables: false }
). There are also features and capabilities that go beyond the specifications and help improve the quality of the HTML output ({ xhtml: false }
, for example). The Marked default language prefix is not spec-based (looks like it was chosen based on another tool), should belanguage-
notlang-
; this assumes that someone should be able to replicate the spec as much as possible without changing any settings, which could help new users understand the mapping between the spec and the code.What solution are you suggesting?
This is more about conversation and discussion about the remainder of 0.x and the no known issues target. See #1218
My immediate thought would be to possibly change options a bit.
This does open up a can of worms as flags are wont to become when used excessively. Therefore, believe stringifying the flavor can help:
...that's as far at my brain has gone so far.