mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-05-15 14:38:03 +02:00
fix: don't drop a path segment when resolving "./" relative URLs
urlRel2abs() prepended an extra "." when it saw "./X", turning the relative path into "../X" and silently moving up a directory. As a result, raw HTML <img src="./imgs/run.png"> inside a README rendered under /r/<repo>/<file> resolved to /r/<repo>/imgs/... instead of /r/<repo>/<dir>/imgs/..., so the image 404'd. Markdown image syntax went through marked-base-url and was unaffected. Strip the leading "./" instead so the relative path concatenates cleanly with baseUrl. Fixes #346.
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user