fix: change same end maching
parent
794923a997
commit
4c2d67cfca
|
@ -65,13 +65,10 @@ def nameToLink? (s : String) : HtmlM (Option String) := do
|
||||||
| _ => pure none
|
| _ => pure none
|
||||||
| _ => pure none
|
| _ => pure none
|
||||||
where
|
where
|
||||||
sameEnd n1 n2 := Id.run do
|
sameEnd n1 n2 :=
|
||||||
let n1' := n1.splitOn "." |>.reverse
|
n1.endsWith n2 ||
|
||||||
let n2' := n2.splitOn "." |>.reverse
|
(n2.endsWith (n1.splitOn ".").getLast!)
|
||||||
for i in [0:n2'.length] do
|
|
||||||
if n1'.getD i "" = n2'.get! i then
|
|
||||||
return true
|
|
||||||
return false
|
|
||||||
|
|
||||||
/--
|
/--
|
||||||
Extend links with following rules:
|
Extend links with following rules:
|
||||||
|
|
Loading…
Reference in New Issue