fix(ci): 组件替换的旧 tag 剥引号(带引号写法如实入账)
This commit is contained in:
1 parent
86b4aa0b27
commit
1e4ff720d1
1 file changed
+2
-2
+2
-2
@@ -616,13 +616,13 @@ for c in components:
|
|||||||
continue
|
continue
|
||||||
m = pat_a.search(line)
|
m = pat_a.search(line)
|
||||||
if m: # 形态 A:同行
|
if m: # 形态 A:同行
|
||||||
old_tag, hit_idx = m.group(2), idx
|
old_tag, hit_idx = m.group(2).strip("\"'"), idx
|
||||||
lines[idx] = pat_a.sub(lambda _m: _m.group(1) + ":" + c["acrTag"], line)
|
lines[idx] = pat_a.sub(lambda _m: _m.group(1) + ":" + c["acrTag"], line)
|
||||||
break
|
break
|
||||||
for j in range(idx + 1, min(idx + 4, len(lines))): # 形态 B:邻近 tag: 字段
|
for j in range(idx + 1, min(idx + 4, len(lines))): # 形态 B:邻近 tag: 字段
|
||||||
mb = pat_b.match(lines[j])
|
mb = pat_b.match(lines[j])
|
||||||
if mb:
|
if mb:
|
||||||
old_tag, hit_idx = mb.group(2), j
|
old_tag, hit_idx = mb.group(2).strip("\"'"), j
|
||||||
lines[j] = mb.group(1) + c["acrTag"] + "\n"
|
lines[j] = mb.group(1) + c["acrTag"] + "\n"
|
||||||
break
|
break
|
||||||
if hit_idx is not None:
|
if hit_idx is not None:
|
||||||
|
|||||||
Reference in new issue
Block a user