File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -137,11 +137,10 @@ jobs:
137137
138138 IMG_EXT = r"(?:png|jpe?g|gif|webp|svg|gifv)"
139139
140- # Defensive: strip any trailing > from URL fragments
141- url = url.strip().rstrip('>')
142-
143140 def clean_filename_from_url(url: str) -> str:
144- # 💡 Defensive: strip accidental empty-title tokens that leaked into URL
141+ # Trim and remove any trailing '>' that can leak from <...> wrappers
142+ url = url.strip().rstrip('>')
143+ # Defensive: strip accidental empty-title tokens that leaked into URL
145144 # e.g. "/_images/image-(810 "").png" -> "/_images/image-(810).png"
146145 url = re.sub(r'\s*""', '', url)
147146
@@ -271,7 +270,7 @@ jobs:
271270 # 6) Catch-all: fix bare .gitbook/assets occurrences (outside code fences)
272271 out_lines, fenced = [], False
273272 fence_re = re.compile(r'^\s*```')
274- asset_re = re.compile(r'(\.gitbook/assets/[^)\s "\'<>]+)', re.I)
273+ asset_re = re.compile(r'(\.gitbook/assets/[^"\'<>]+)', re.I)
275274 for ln in s.splitlines():
276275 if fence_re.match(ln):
277276 fenced = not fenced
You can’t perform that action at this time.
0 commit comments