Skip to content

Commit 00105d3

Browse files
committed
Fix tests on Windows
1 parent ac1c391 commit 00105d3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/test_bibliography_block_pages.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@ include("file_content.jl")
88

99
# regex for strings containing paths
1010
function prx(s)
11-
rx = s
11+
rx = escape_string(s)
1212
# work around limitations of `replace` in Julia 1.6
1313
for mapping in ["[" => "\\[", "]" => "\\]", "." => "\\.", "/" => "\\W*"]
1414
# The mapping for path separators ("/") to "\W*" (sequence of non-word
1515
# characters) is deliberately broad. I've found it frustratingly hard
1616
# to get a regex that works on Windows.
1717
rx = replace(rx, mapping)
1818
end
19+
@show rx # DEBUG
20+
@show Regex(rx) # DEBUG
1921
Regex(rx)
2022
end
2123

0 commit comments

Comments
 (0)