Refine array format validation
Agent-Logs-Url: https://github.com/wesleyel/swiftui-math/sessions/56436444-e15b-4dd0-8a70-c87df1e3dc4e Co-authored-by: wesleyel <48174882+wesleyel@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
d5cee555e4
commit
e86cf33070
@@ -1329,7 +1329,7 @@ extension Math {
|
||||
format.append(char)
|
||||
case "|":
|
||||
format.append(char)
|
||||
case " ":
|
||||
case _ where char.isWhitespace:
|
||||
continue
|
||||
default:
|
||||
self.setError(
|
||||
@@ -1346,7 +1346,9 @@ extension Math {
|
||||
|
||||
if self.error == nil && columnAlignments.isEmpty {
|
||||
self.setError(
|
||||
.invalidEnvironment, message: "array environment requires column alignment specifiers")
|
||||
.invalidEnvironment,
|
||||
message: "array environment requires at least one column alignment specifier (l, c, or r)"
|
||||
)
|
||||
}
|
||||
|
||||
return self.error == nil ? (columnAlignments, format) : (nil, nil)
|
||||
|
||||
Reference in New Issue
Block a user