From f82f9e9cea89eaf4a42e7cbde49c9ffb2579283c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 6 Apr 2026 15:34:55 +0000 Subject: [PATCH] Simplify begin environment parsing 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> --- Sources/SwiftUIMath/Internal/Syntax/Parser.swift | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Sources/SwiftUIMath/Internal/Syntax/Parser.swift b/Sources/SwiftUIMath/Internal/Syntax/Parser.swift index 4babbcd..12596a8 100644 --- a/Sources/SwiftUIMath/Internal/Syntax/Parser.swift +++ b/Sources/SwiftUIMath/Internal/Syntax/Parser.swift @@ -805,11 +805,7 @@ extension Math { return table } else if command == "begin" { - let env = self.readEnvironment() - if env == nil { - return nil - } - guard let env else { + guard let env = self.readEnvironment() else { return nil } guard let environmentOptions = self.readEnvironmentOptions(for: env) else {