markdown: escape the meta information of code block in html
[nit.git] / contrib / nitiwiki / src / wiki_base.nit
index 62dee9c..5f093a0 100644 (file)
@@ -151,7 +151,7 @@ class Nitiwiki
                path = path.simplify_path
                if entries.has_key(path) then return entries[path].as(WikiSection)
                var root = expand_path(config.root_dir, config.source_dir)
-               var name = path.basename("")
+               var name = path.basename
                var section = new WikiSection(self, name)
                entries[path] = section
                if path == root then return section
@@ -616,8 +616,7 @@ class WikiConfig
 
        # Returns the config value at `key` or return `default` if no key was found.
        private fun value_or_default(key: String, default: String): String do
-               if not has_key(key) then return default
-               return self[key]
+               return self[key] or else default
        end
 
        # Site name displayed.