This repository has been archived by the owner on Feb 12, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
1,549 additions
and
1,264 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { OOElement } from '../xml/nodes'; | ||
|
||
export type Indent = Record<'start' | 'end' | 'firstLine' | 'hanging', string | null>; | ||
|
||
// ind (Paragraph Indentation) | ||
// This element specifies the set of indentation properties applied to the current paragraph. | ||
export function createParagraphIndent(el: OOElement): Indent | null { | ||
const indent = el.first('w:ind'); | ||
if (!indent) return null; | ||
return { | ||
start: indent.attributes['w:start'] || indent.attributes['w:left'] || null, | ||
end: indent.attributes['w:end'] || indent.attributes['w:right'] || null, | ||
firstLine: indent.attributes['w:firstLine'] || null, | ||
hanging: indent.attributes['w:hanging'] || null, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.