We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
3.10.0
In packages/@markuplint/ml-spec/src/dom-traverse/get-content-model.ts, the result is set to cacheByEl in line 35, but the cache is fetched from cachesBySpecs in line 15.
cacheByEl
cachesBySpecs
It seems the original intention was to set the result to cachesBySpecs, not cacheByEl.
... const cachesBySpecs = new Map<Specs, Map<Element, ReadonlyDeep<PermittedContentPattern[]> | boolean | null>>(); ... const cacheByEl = cachesBySpecs.get(specs) ?? new Map<Element, PermittedContentPattern[] | boolean>(); ... cacheByEl.set(el, spec.contentModel.contents); ...
Just run Markuplint as usual.
ContentModel is calculated every time.
ContentModel is cached after the first calculation.
The text was updated successfully, but these errors were encountered:
I don't know how to test caching in Jest, but I can create a pull request for this issue if I don't have to add an additional test.
Sorry, something went wrong.
No branches or pull requests
3.10.0
Describe the bug
In packages/@markuplint/ml-spec/src/dom-traverse/get-content-model.ts, the result is set to
cacheByEl
in line 35, but the cache is fetched fromcachesBySpecs
in line 15.It seems the original intention was to set the result to
cachesBySpecs
, notcacheByEl
.Code Example
Steps To Reproduce
Just run Markuplint as usual.
The current behavior
ContentModel is calculated every time.
The expected behavior
ContentModel is cached after the first calculation.
The text was updated successfully, but these errors were encountered: