fix: ignore trailing whitespace in bracketed file links
This commit is contained in:
parent
04951e7e9b
commit
000aaf9685
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,7 @@ pub fn parse(link: []const u8) error{InvalidFileLink}!Dest {
|
||||||
|
|
||||||
if (std.mem.lastIndexOfScalar(u8, link, '(')) |pos| blk: {
|
if (std.mem.lastIndexOfScalar(u8, link, '(')) |pos| blk: {
|
||||||
for (link[pos + 1 ..]) |c| switch (c) {
|
for (link[pos + 1 ..]) |c| switch (c) {
|
||||||
'0'...'9', ',', ')', ':' => continue,
|
'0'...'9', ',', ')', ':', ' ' => continue,
|
||||||
else => break :blk,
|
else => break :blk,
|
||||||
};
|
};
|
||||||
return parse_bracket_link(link);
|
return parse_bracket_link(link);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue