-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use default options in Renderer by default #1203
Conversation
@Feder1co5oave is there any reason Renderer options would be set to an empty object instead of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's odd, maybe it was a miss?
This probably should use the defaults.
This is a breaking change for anyone using var r = new Renderer()
, right?
Yes it would be a breaking change but I feel like it would be a fix. Right now that would be the same as the following: var r = new Renderer({
baseUrl: undefined,
breaks: undefined,
gfm: undefined,
headerIds: undefined,
headerPrefix: undefined,
highlight: undefined,
langPrefix: undefined,
mangle: undefined,
pedantic: undefined,
renderer: undefined,
sanitize: undefined,
sanitizer: undefined,
silent: undefined,
smartLists: undefined,
smartypants: undefined,
tables: undefined,
xhtml: undefined
}); which I don't think anyone would do willingly. So it would be more likely that anyone using the renderer would pass some options so this wouldn't break anything. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would want to make sure our next release is 0.4.x due to the breaking change, but I think the options need some work anyway given what I've seen so far...might be a good place to start stabilizing things.
Ya I would say we should merge it as a bug fix and release when 0.4.x milestone is ready. I was looking through the blame and it looks like it was just missed when the renderer was created. |
Done |
use default options in Renderer
Marked version: 0.3.19
Description
I'm not sure if there is a reason the Renderer options were set to an empty object instead of the default options. The Parser and Lexers are set to the default options already
Contributor
Committer
In most cases, this should be a different person than the contributor.