jats-xml
Version:
Types and utilities for working with JATS in Typescript
23 lines • 782 B
TypeScript
/**
* Literal find/replace fixes for malformed JATS seen in the wild.
* Each entry emits at most one vfile message when it matches.
*/
export type KnownXmlDefectRepair = {
from: string;
to: string;
};
export declare function knownXmlDefectRepairMessage(from: string, to: string): string;
export type AppliedXmlDefectRepair = {
repair: KnownXmlDefectRepair;
count: number;
};
export type RepairKnownXmlDefectsResult = {
xml: string;
applied: AppliedXmlDefectRepair[];
};
/**
* Apply KNOWN_XML_DEFECT_REPAIRS in order. Each rule uses a single literal
* `from` → `to` substitution (all occurrences of `from`).
*/
export declare function repairKnownXmlDefects(xml: string): RepairKnownXmlDefectsResult;
//# sourceMappingURL=repairKnownXmlDefects.d.ts.map