Repository navigation
Conversation
A parenthesised path with a space in its filename was linked as the folder prefix. .conf joins the shared link extensions, parentheses bound the whole path, and a hard wrap between filename words keeps the separating space and the clickable cells on each row. Fixes Ark0N#733 Co-authored-by: DDT <1786035110@qq.com>
|
Thank you for picking this up, Hugo-DDT. This PR makes a parenthesised path with a space in its name, such as The 1. Parentheses act as a path label, so prose inside them becomes a path (
Both surfaces share 2.
So "Existing URL, folder, and mid-token path joins are unchanged" does not hold for a cut between two letters after an open paren. Please scope the rule to the parenthesis that opens the broken-off path itself (not Even scoped that way, the third shape stays ambiguous: a parenthesised path cut between two letters looks exactly like the Kobo wrap, and both readings are valid paths. Whether fixing the wrapped Kobo case is worth that cost is an open question on my side. If the rule stays, the trade-off needs a sentence in Smaller
Typecheck, lint, format and the link test files all pass locally and CI is green; the problems above are behaviours the current tests do not exercise. Once items 1 and 2 are addressed and the trade-off question is settled, this is close to ready. |
Fixes #733
A parenthesised file path with a space in its filename (
(/mnt/data/Kobo/Kobo eReader.conf), including when that name is hard-wrapped between the words) was linked as the folder prefix/mnt/data/Kobo/Kobo..confis now a link extension, matching the text the guarded attachment routes already serve. Parentheses bound the whole spaced path (absolute, relative,~/, or a bare filename), so the folder prefix and the extension-bearing tail are not linked as fragments. A hard wrap between those filename words keeps the separating space, and the clickable cells stay on the rows that hold the name. Existing URL, folder, and mid-token path joins are unchanged.Tests:
test/spaced-file-path-links.test.ts,test/file-path-link-forms.test.ts, andtest/response-viewer-file-links.test.ts(these failed before the fix and pass after).