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

Allow MathML verification options to be specified in the input jax. #519

Merged
merged 1 commit into from
Jul 6, 2020
Merged
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
18 changes: 5 additions & 13 deletions ts/input/mathml/MathMLCompile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,14 @@ export class MathMLCompile<N, T, D> {
public static OPTIONS: OptionList = {
MmlFactory: null, // The MmlFactory to use (defaults to a new MmlFactory)
fixMisplacedChildren: true, // True if we want to use heuristics to try to fix
// problems with the tree based on HTML not handling
// self-closing tags properly
verify: {}, // Options to pass to verifyTree() controlling MathML verification
// problems with the tree based on HTML not handling
// self-closing tags properly
verify: { // Options to pass to verifyTree() controlling MathML verification
...AbstractMmlNode.verifyDefaults
},
translateEntities: true // True means translate entities in text nodes
};

/**
* The default values for the verify option
*/
public static VERIFY: OptionList = {
...AbstractMmlNode.verifyDefaults
};

/**
* The DOMAdaptor for the document being processed
*/
Expand All @@ -81,9 +76,6 @@ export class MathMLCompile<N, T, D> {
constructor(options: OptionList = {}) {
const Class = this.constructor as typeof MathMLCompile;
this.options = userOptions(defaultOptions({}, Class.OPTIONS), options);
if (this.options['verify']) {
this.options['verify'] = userOptions(defaultOptions({}, Class.VERIFY), this.options['verify']);
}
}

/**
Expand Down