Skip to content

Commit

Permalink
Preventing NPE when parsing block attributes for listings (#1755)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahus1 committed Dec 21, 2024
1 parent 0cc7b43 commit dbe9d38
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ This document provides a high-level view of the changes introduced by release.
- Make wrap-on-typing work for AsciiDoc without chopping an existing line into small chunks (#1653)
- Handle YAML parsing errors when showing an editor notification about missing information in the Antora component descriptor (#1753)
- Preventing NPE when creating a missing file (#1754)
- Preventing NPE when parsing block attributes for listings (#1755)

=== 0.43.4

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public boolean validateContent() {
AsciiDocBlockAttributes blockAttributes = PsiTreeUtil.findChildOfType(this, AsciiDocBlockAttributes.class);
if (blockAttributes != null) {
String[] attr = blockAttributes.getAttributes();
if (attr.length > 0 && attr[0].contains("%novalidate")) {
if (attr != null && attr.length > 0 && attr[0].contains("%novalidate")) {
return false;
}
String opts = blockAttributes.getAttribute("opts");
Expand Down

0 comments on commit dbe9d38

Please sign in to comment.