feat: implement mphatom use case always destroying its content
This commit is contained in:
parent
3d33d61f03
commit
95862aca6a
|
@ -14,6 +14,7 @@ import {
|
|||
MEnclose,
|
||||
MError,
|
||||
MOver,
|
||||
MPhantom,
|
||||
} from './mathml-tags';
|
||||
|
||||
export class Dispatcher {
|
||||
|
@ -57,6 +58,8 @@ export class Dispatcher {
|
|||
return new MError(this._value, this._attributes, this._children);
|
||||
case 'mover':
|
||||
return new MOver(this._value, this._attributes, this._children);
|
||||
case 'mphantom':
|
||||
return new MPhantom(this._value, this._attributes, this._children);
|
||||
case 'mrow':
|
||||
case 'mpadded':
|
||||
return new GenericContentWrapperTag(this._name, this._value, this._attributes, this._children);
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
import { MathMLTag } from './MathMLTag';
|
||||
|
||||
export class MPhantom extends MathMLTag {
|
||||
constructor(value: string, attributes: Record<string, string>, children: MathMLTag[]) {
|
||||
super('mphantom', value, attributes, children);
|
||||
}
|
||||
|
||||
convert(): string {
|
||||
return '';
|
||||
}
|
||||
}
|
|
@ -13,3 +13,4 @@ export { MAction } from './MAction';
|
|||
export { MEnclose } from './MEnclose';
|
||||
export { MError } from './MError';
|
||||
export { MOver } from './MOver';
|
||||
export { MPhantom } from './MPhantom';
|
||||
|
|
Loading…
Reference in New Issue