equal
deleted
inserted
replaced
26 { |
26 { |
27 Output.warning("Suspicious Unicode character " + quote(Word.codepoint(c)) + |
27 Output.warning("Suspicious Unicode character " + quote(Word.codepoint(c)) + |
28 Position.here(line_pos(i))) |
28 Position.here(line_pos(i))) |
29 } |
29 } |
30 } |
30 } |
31 catch { case ERROR(msg) => Output.error_message(msg + Position.here(line_pos(i))) } |
31 catch { case ERROR(msg) => Output.warning(msg + Position.here(line_pos(i))) } |
32 |
32 |
33 if (line.contains('\t')) |
33 if (line.contains('\t')) |
34 Output.warning("TAB character" + Position.here(line_pos(i))) |
34 Output.warning("TAB character" + Position.here(line_pos(i))) |
35 } |
35 } |
36 |
36 |
37 if (content.contains('\r')) |
37 if (content.contains('\r')) |
38 Output.warning("CR character" + Position.here(file_pos)) |
38 Output.warning("CR character" + Position.here(file_pos)) |
|
39 |
|
40 if (Word.bidi_detect(content)) |
|
41 Output.warning("Bidirectional Unicode text " + Position.here(file_pos)) |
39 } |
42 } |
40 |
43 |
41 def check_hg(root: Path) |
44 def check_hg(root: Path) |
42 { |
45 { |
43 Output.writeln("Checking " + root + " ...") |
46 Output.writeln("Checking " + root + " ...") |