Fixed files with backslashes not reporting any items
Parse_linemarker was turning double backslashes into quadruple backslashes. Making it instead turn them into single backslashes makes the `lm.value().file == path` comparison true in preprocess() so that p.enable_write() is called. Fixes #106.
This commit is contained in:
parent
210d536eb0
commit
b958847850
1 changed files with 6 additions and 3 deletions
|
|
@ -1030,10 +1030,13 @@ ts::optional<linemarker> parse_linemarker(position& p)
|
|||
p.skip();
|
||||
|
||||
std::string file_name;
|
||||
for (; !starts_with(p, "\""); p.skip())
|
||||
for (; !starts_with(p, R"(")"); p.skip())
|
||||
{
|
||||
if (*p.ptr() == '\\')
|
||||
file_name += "\\\\";
|
||||
if (starts_with(p, R"(\\)"))
|
||||
{
|
||||
file_name += R"(\)";
|
||||
p.skip();
|
||||
}
|
||||
else
|
||||
file_name += *p.ptr();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue