Skip to content
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

Clear process bits for findMath and attach-speech, and remove safe bit that isn't needed. #1034

Merged
merged 1 commit into from
Dec 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ts/a11y/semantic-enrich.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,9 @@ export function EnrichedMathDocumentMixin<N, T, D, B extends MathDocumentConstru
if (state < STATE.ENRICHED) {
this.processed.clear('enriched');
}
if (state < STATE.ATTACHSPEECH) {
this.processed.clear('attach-speech');
}
return this;
}

Expand Down
3 changes: 3 additions & 0 deletions ts/core/MathDocument.ts
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,9 @@ export abstract class AbstractMathDocument<N, T, D> implements MathDocument<N, T
if (state < STATE.COMPILED) {
this.processed.clear('compile');
}
if (state < STATE.FINDMATH) {
this.processed.clear('findMath');
}
return this;
}

Expand Down
4 changes: 0 additions & 4 deletions ts/ui/safe/SafeHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,6 @@ export function SafeMathDocumentMixin<N, T, D, B extends MathDocumentConstructor
constructor(...args: any[]) {
super(...args);
this.safe = new this.options.SafeClass(this, this.options.safeOptions);
const ProcessBits = (this.constructor as typeof BaseDocument).ProcessBits;
if (!ProcessBits.has('safe')) {
ProcessBits.allocate('safe');
}
for (const jax of this.inputJax) {
if (jax.name.match(/MathML/)) {
(jax as any).mathml.filterAttribute = this.safe.mmlAttribute.bind(this.safe);
Expand Down