X-Git-Url: http://nitlanguage.org diff --git a/contrib/nitiwiki/src/wiki_links.nit b/contrib/nitiwiki/src/wiki_links.nit index 96c6fd6..efb9f78 100644 --- a/contrib/nitiwiki/src/wiki_links.nit +++ b/contrib/nitiwiki/src/wiki_links.nit @@ -90,10 +90,6 @@ end redef class WikiEntry - # Absolute url to `self` once generated. - # If you use this, the generated files will hard-code `root_url` - fun url: String do return wiki.config.root_url / href - # Relative path to `self` from the target root_url fun href: String do return breadcrumbs.join("/") @@ -218,7 +214,8 @@ class NitiwikiMdProcessor end end -private class NitiwikiDecorator +# The decorator associated to `MarkdownProcessor`. +class NitiwikiDecorator super HTMLDecorator # Wiki used to resolve links. @@ -233,27 +230,29 @@ private class NitiwikiDecorator var anchor: nullable String = null var link = token.link if link == null then return - if link.has("#") then - var parts = link.split_with("#") - link = parts.first - anchor = parts.subarray(1, parts.length - 1).join("#") - end - if link.has("/") then - target = wiki.lookup_entry_by_path(context, link.to_s) - else - target = wiki.lookup_entry_by_name(context, link.to_s) - if target == null then - target = wiki.lookup_entry_by_title(context, link.to_s) - end - end - v.add "