fix: only warn if langPrefix is changed#2796
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
calculuschild
left a comment
There was a problem hiding this comment.
Ok. This seems reasonable.
| highlight: null, | ||
| hooks: null, | ||
| langPrefix: 'language-', | ||
| langPrefix: null, |
There was a problem hiding this comment.
Technically this is semver major because its a breaking change to the public API
import marked from 'marked';
const result = marked.getDefaults();There was a problem hiding this comment.
Have we considered using (and is it possible to use) empty types instead of null?
Coming at it from someone who doesn't know the architecture and intent, I'd need to search and find what's expected from the argument list, yeah?
There was a problem hiding this comment.
That is true. And any extensions that rely on options.langPrefix could break.
There was a problem hiding this comment.
I changed this PR to only check if langPrefix has changed from it's default value before warning about it.
## [5.0.1](v5.0.0...v5.0.1) (2023-05-06) ### Bug Fixes * only warn if langPrefix is changed ([#2796](#2796)) ([d193694](d193694))
## [5.0.1](markedjs/marked@v5.0.0...v5.0.1) (2023-05-06) ### Bug Fixes * only warn if langPrefix is changed ([#2796](markedjs/marked#2796)) ([6c43252](markedjs/marked@6c43252))
Marked version: 5.0.0
Description
This removes the warning for langPrefix unless it is changed.
The default warnings can be silenced by setting the following options:
Contributor
Committer
In most cases, this should be a different person than the contributor.