nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nit: Added link to `CONTRIBUTING.md` from the README
[nit.git]
/
contrib
/
nitiwiki
/
src
/
wiki_html.nit
diff --git
a/contrib/nitiwiki/src/wiki_html.nit
b/contrib/nitiwiki/src/wiki_html.nit
index
8042af6
..
ab79f09
100644
(file)
--- a/
contrib/nitiwiki/src/wiki_html.nit
+++ b/
contrib/nitiwiki/src/wiki_html.nit
@@
-189,10
+189,7
@@
redef class WikiArticle
fun load_template(template_file: String): TemplateString do
var tpl = wiki.load_template(template_file)
if tpl.has_macro("ROOT_URL") then
fun load_template(template_file: String): TemplateString do
var tpl = wiki.load_template(template_file)
if tpl.has_macro("ROOT_URL") then
- var root_dir = href.dirname.relpath("")
- # Avoid issues if the macro is just followed by a `/` (as with url prefix)
- if root_dir == "" then root_dir = "."
- tpl.replace("ROOT_URL", root_dir)
+ tpl.replace("ROOT_URL", root_href)
end
return tpl
end
end
return tpl
end