Skip to content

Commit

Permalink
make lists less strict about having a ul/ol tag
Browse files Browse the repository at this point in the history
  • Loading branch information
DeDiamondPro committed Jun 1, 2024
1 parent 282bb50 commit ae1332b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ plugins {
}

group = "dev.dediamondpro"
version = "1.1.0+localtest15"
version = "1.1.0"

repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@ public abstract class ListElement<S extends Style, R> extends ChildMovingElement
public ListElement(@NotNull S style, @NotNull LayoutStyle layoutStyle, @Nullable Element<S, R> parent, @NotNull String qName, @Nullable Attributes attributes) {
super(style, layoutStyle, parent, qName, attributes);
if (!(parent instanceof ListHolderElement)) {
throw new IllegalArgumentException("List element has no surrounding list holder!");
listType = ListHolderElement.ListType.UNORDERED;
elementIndex = 0;
} else {
ListHolderElement<S, R> holder = (ListHolderElement<S, R>) parent;
listType = holder.getListType();
elementIndex = holder.getChildren().indexOf(this);
}
ListHolderElement<S, R> holder = (ListHolderElement<S, R>) parent;
listType = holder.getListType();
elementIndex = holder.getChildren().indexOf(this);
}


Expand Down

0 comments on commit ae1332b

Please sign in to comment.