fix(VDE-245): raw string delimiter collision in GB 建-门窗 regex
Build & Test / build-and-test (push) Has been cancelled
VDE Build & Test / build-and-test (push) Has been cancelled
Build & Test / python-bindings (push) Has been cancelled

The pattern R"(^建-门)|(^建-窗)" was broken because the ) in
(^建-门) terminates the R"(...)" raw string prematurely.
Fixed by simplifying to ^建-[门窗] character class, which is both
correcter (matches 建-门* and 建-窗*) and avoids the delimiter issue.

Verified: all 101 regex patterns across 4 standards compile and
pass validation tests.
This commit is contained in:
茂之钳
2026-08-02 03:41:59 +08:00
parent 30fd8b6f2f
commit 59e9194443
+1 -1
View File
@@ -279,7 +279,7 @@ struct LayerStandardSpec {
spec.layers = {
// ── 建筑 (建) ──
{"建-墙体", R"(^建-墙)", "建筑墙体", 7, LineType::Continuous, 0.50, true},
{"建-门窗", R"(^建-门)|(^建-窗)", "建筑门窗", 7, LineType::Continuous, 0.35, true},
{"建-门窗", R"(^建-[门窗])", "建筑门窗", 7, LineType::Continuous, 0.35, true},
{"建-楼梯", R"(^建-楼梯)", "建筑楼梯", 7, LineType::Continuous, 0.35, false},
{"建-楼板", R"(^建-楼板)", "建筑楼板", 7, LineType::Continuous, 0.50, false},
{"建-屋顶", R"(^建-屋顶)", "建筑屋顶", 7, LineType::Continuous, 0.50, false},