fix(anatomy): R5.4 guard covers links, autolinks, references, CJK underscores; ids validated at the op; prescan before the drawing comparison
This commit is contained in:
1 parent
68dec25e5e
commit
df82424107
9 files changed
+195
-12
No files matched your search
@@ -67,8 +67,13 @@ fn raw_reports(frozen: &Value, case: &Value) -> (String, Result<String, Pipeline
|
||||
const EQUINE_SAFE: &str = "[]&#{}=<>\"':;()/%?-.,«»…≠°—+";
|
||||
|
||||
fn equine_safe(probe: &str) -> bool {
|
||||
// A leading or trailing space becomes two spaces once the probe sits in its sentence.
|
||||
!probe.contains(" ")
|
||||
// A leading or trailing space becomes two spaces once the probe sits in its sentence; the
|
||||
// inline constructs (links, wiki links, autolinks, character references) are probed apart.
|
||||
let construct = ["](", "][", "[[", "&", "<h", "<a@"]
|
||||
.iter()
|
||||
.any(|m| probe.contains(m));
|
||||
!construct
|
||||
&& !probe.contains(" ")
|
||||
&& !probe.starts_with(' ')
|
||||
&& !probe.ends_with(' ')
|
||||
&& probe
|
||||
@@ -132,6 +137,6 @@ fn every_probe_is_formatted_as_the_typescript_or_refused() {
|
||||
"silent differences for {} probes: {silent:?}",
|
||||
silent.len()
|
||||
);
|
||||
assert_eq!(same + refused, 220);
|
||||
assert_eq!(same + refused, 247);
|
||||
println!("{same} identical, {refused} refused");
|
||||
}
|
||||
Reference in new issue
Block a user