Fix more spelling rules
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import { XmlAttributeComponent } from "@file/xml-components";
|
||||
|
||||
/* cSpell:disable */
|
||||
export interface IDocumentAttributesProperties {
|
||||
readonly wpc?: string;
|
||||
readonly mc?: string;
|
||||
@ -41,6 +42,7 @@ export interface IDocumentAttributesProperties {
|
||||
readonly w16sdtdh?: string;
|
||||
readonly w16se?: string;
|
||||
}
|
||||
/* cSpell:enable */
|
||||
|
||||
export class DocumentAttributes extends XmlAttributeComponent<IDocumentAttributesProperties> {
|
||||
protected readonly xmlKeys = {
|
||||
|
@ -1,7 +1,7 @@
|
||||
export * from "./math-accent-character";
|
||||
export * from "./math-base";
|
||||
export * from "./math-limit-location";
|
||||
export * from "./math-naray-properties";
|
||||
export * from "./math-n-ary-properties";
|
||||
export * from "./math-sub-script";
|
||||
export * from "./math-sum";
|
||||
export * from "./math-super-script";
|
||||
|
@ -2,14 +2,14 @@ import { expect } from "chai";
|
||||
|
||||
import { Formatter } from "@export/formatter";
|
||||
|
||||
import { MathNArayProperties } from "./math-naray-properties";
|
||||
import { MathNAryProperties } from "./math-n-ary-properties";
|
||||
|
||||
describe("MathNArayProperties", () => {
|
||||
describe("MathNAryProperties", () => {
|
||||
describe("#constructor()", () => {
|
||||
it("should create a MathNArayProperties with correct root key", () => {
|
||||
const mathNArayProperties = new MathNArayProperties("∑", true, true);
|
||||
it("should create a MathNAryProperties with correct root key", () => {
|
||||
const mathNAryProperties = new MathNAryProperties("∑", true, true);
|
||||
|
||||
const tree = new Formatter().format(mathNArayProperties);
|
||||
const tree = new Formatter().format(mathNAryProperties);
|
||||
expect(tree).to.deep.equal({
|
||||
"m:naryPr": [
|
||||
{
|
||||
@ -31,9 +31,9 @@ describe("MathNArayProperties", () => {
|
||||
});
|
||||
|
||||
it("should add super-script hide attributes", () => {
|
||||
const mathNArayProperties = new MathNArayProperties("∑", false, true);
|
||||
const mathNAryProperties = new MathNAryProperties("∑", false, true);
|
||||
|
||||
const tree = new Formatter().format(mathNArayProperties);
|
||||
const tree = new Formatter().format(mathNAryProperties);
|
||||
expect(tree).to.deep.equal({
|
||||
"m:naryPr": [
|
||||
{
|
||||
@ -62,9 +62,9 @@ describe("MathNArayProperties", () => {
|
||||
});
|
||||
|
||||
it("should add sub-script hide attributes", () => {
|
||||
const mathNArayProperties = new MathNArayProperties("∑", true, false);
|
||||
const mathNAryProperties = new MathNAryProperties("∑", true, false);
|
||||
|
||||
const tree = new Formatter().format(mathNArayProperties);
|
||||
const tree = new Formatter().format(mathNAryProperties);
|
||||
expect(tree).to.deep.equal({
|
||||
"m:naryPr": [
|
||||
{
|
||||
@ -93,9 +93,9 @@ describe("MathNArayProperties", () => {
|
||||
});
|
||||
|
||||
it("should add both super-script and sub-script hide attributes", () => {
|
||||
const mathNArayProperties = new MathNArayProperties("∑", false, false);
|
||||
const mathNAryProperties = new MathNAryProperties("∑", false, false);
|
||||
|
||||
const tree = new Formatter().format(mathNArayProperties);
|
||||
const tree = new Formatter().format(mathNAryProperties);
|
||||
expect(tree).to.deep.equal({
|
||||
"m:naryPr": [
|
||||
{
|
@ -6,7 +6,7 @@ import { MathLimitLocation } from "./math-limit-location";
|
||||
import { MathSubScriptHide } from "./math-sub-script-hide";
|
||||
import { MathSuperScriptHide } from "./math-super-script-hide";
|
||||
|
||||
export class MathNArayProperties extends XmlComponent {
|
||||
export class MathNAryProperties extends XmlComponent {
|
||||
constructor(accent: string, hasSuperScript: boolean, hasSubScript: boolean) {
|
||||
super("m:naryPr");
|
||||
|
@ -3,7 +3,7 @@ import { XmlComponent } from "@file/xml-components";
|
||||
|
||||
import { MathComponent } from "../math-component";
|
||||
import { MathBase } from "./math-base";
|
||||
import { MathNArayProperties } from "./math-naray-properties";
|
||||
import { MathNAryProperties } from "./math-n-ary-properties";
|
||||
import { MathSubScriptElement } from "./math-sub-script";
|
||||
import { MathSuperScriptElement } from "./math-super-script";
|
||||
|
||||
@ -17,7 +17,7 @@ export class MathSum extends XmlComponent {
|
||||
constructor(options: IMathSumOptions) {
|
||||
super("m:nary");
|
||||
|
||||
this.root.push(new MathNArayProperties("∑", !!options.superScript, !!options.subScript));
|
||||
this.root.push(new MathNAryProperties("∑", !!options.superScript, !!options.subScript));
|
||||
|
||||
if (!!options.subScript) {
|
||||
this.root.push(new MathSubScriptElement(options.subScript));
|
||||
|
@ -27,6 +27,7 @@ export enum RelativeVerticalPosition {
|
||||
}
|
||||
|
||||
export interface ITableFloatOptions {
|
||||
/* cSpell:disable */
|
||||
/**
|
||||
* Specifies the horizontal anchor or the base object from which the horizontal positioning in the
|
||||
* tblpX or tblpXSpec attribute should be determined.
|
||||
@ -35,6 +36,7 @@ export interface ITableFloatOptions {
|
||||
* text - relative to the vertical edge of the text margin for the column in which the anchor paragraph is located
|
||||
* If omitted, the value is assumed to be page.
|
||||
*/
|
||||
/* cSpell:enable */
|
||||
readonly horizontalAnchor?: TableAnchorType;
|
||||
|
||||
/**
|
||||
|
@ -13,8 +13,8 @@ export function convertToXmlComponent(element: XmlElement): ImportedXmlComponent
|
||||
case undefined:
|
||||
case "element":
|
||||
const xmlComponent = new ImportedXmlComponent(element.name as string, element.attributes);
|
||||
const childElments = element.elements || [];
|
||||
for (const childElm of childElments) {
|
||||
const childElements = element.elements || [];
|
||||
for (const childElm of childElements) {
|
||||
const child = convertToXmlComponent(childElm);
|
||||
if (child !== undefined) {
|
||||
xmlComponent.push(child);
|
||||
|
Reference in New Issue
Block a user