feat: add mfenced and mtable as matrix

This commit is contained in:
Alexandre Nunes 2020-09-19 16:04:57 -03:00
parent 4a4ca1948f
commit a9d9ba498f

@ -11,8 +11,8 @@ export class MFenced extends MathMLTag {
constructor(value: string, attributes: Record<string, string>, children: MathMLTag[]) {
super('mfenced', value, attributes, children);
this._open = this._attributes.open || '(';
this._close = this._attributes.close || ')';
this._open = this._attributes.open || '';
this._close = this._attributes.close || '';
this._separators = Array.from(this._attributes.separators || '');
}
@ -33,8 +33,8 @@ class Vector {
private readonly _separators: string[];
constructor(open: string, close: string, separators: string[]) {
this._open = open;
this._close = close;
this._open = open || '(';
this._close = close || ')';
this._separators = separators;
}
@ -64,10 +64,12 @@ class Matrix {
return 'vmatrix';
case '||':
return 'Vmatrix';
case '[':
return 'bmatrix';
case '{':
return 'Bmatrix';
default:
return 'bmatrix';
return 'matrix';
}
}
}