#2733 Add error if level exceeds 9
This commit is contained in:
@ -11,6 +11,11 @@ export class NumberProperties extends XmlComponent {
|
||||
class IndentLevel extends XmlComponent {
|
||||
constructor(level: number) {
|
||||
super("w:ilvl");
|
||||
|
||||
if (level > 9) {
|
||||
throw new Error("Level cannot be greater than 9. Read more here: https://answers.microsoft.com/en-us/msoffice/forum/all/does-word-support-more-than-9-list-levels/d130fdcd-1781-446d-8c84-c6c79124e4d7");
|
||||
}
|
||||
|
||||
this.root.push(
|
||||
new Attributes({
|
||||
val: level,
|
||||
|
Reference in New Issue
Block a user