If warning is blank, revert to defaults

This commit is contained in:
Vitor Pamplona
2026-03-11 14:12:02 -04:00
parent ffe5e14b2b
commit 1c044c9072
@@ -36,7 +36,7 @@ class ContentWarningTag(
fun parse(tags: Array<String>): ContentWarningTag? {
ensure(tags[0] == TAG_NAME) { return null }
return ContentWarningTag(tags.getOrNull(1).ifBlank { null })
return ContentWarningTag(tags.getOrNull(1)?.ifBlank { null })
}
fun assemble() = arrayOfNotNull(TAG_NAME)