docs: function markdown(text, inline) {
      var r;
  
      if (text !== undefined)
        r = md_conrefs.replaceConref(text);
  
      else
        r = "";
  
      r = namp(r).html;
  
      // inline markdown means to strip enclosing tag, which in this case is <p>
      if (inline === true) {
          r = r.slice(3, -5);
      }
  
      // FIXME
      // desugar [[foo#bar]] tokens into local links
      // N.B. in order to not apply conversion in <code> blocks,
      // we first store replace code blocks with nonces
      var codes = {};
      r = r.replace(/(<code>[\s\S]*?<\/code>)/g, function (all, def) {
        var nonce = Math.random().toString().substring(2);
        codes[nonce] = def;
        return '@-=@=-@' + nonce + '@-=@=-@';
      });
  
      // convert [[link]] to links
      r = r.replace(/\[\[([\s\S]+?)\]\]/g, function (all, def) {
        def = def.split(/\s+/);
        id = def.shift();
        // invalid references don't produce links
        /*if (!list[id]) {// it's in a different file--list only refers to current page
            obj = fullList[id];
  
            if (obj === undefined) { // it might be global
                obj = {};
                obj.id = id;
            }
        }*/
        //else {
            obj = list[id];
        //}
  
        var obj = _.extend({name: def.join(' ') || id, globalId: id}, list[id]);
        obj.name = def.join(' ') || id;
  
        // lame, but I'm tired of writing stuff like [[child_process.fork `child_process.fork()`]]
        // If I didn't do this, it'd come out as an unstyled link
        if (def.length == 0) {
          if (obj.type === undefined && additionalObjsJSON[obj.name] === undefined && obj.name !== "Mixed") {
            console.error("Error".red + ": you tried to create a short link to an object that doesn't exist!");
            console.error(obj);
          } 
  
          if (additionalObjsJSON[obj.name] !== undefined)
            obj.name = "<code>" + obj.name + "</code>";
          else if (obj.type && obj.type !== "class" && obj.type.indexOf("property") < 0)
            obj.name = "<code>" + obj.name + "()</code>";
          else
            obj.name = "<code>" + obj.name + "</code>";
        }
  
        return link(obj, ['link-short'], true);
      });
  
      // restore code blocks, given previously stored nonces
      r = r.replace(/@-=@=-@(\d+)@-=@=-@/g, function (all, nonce) {
        return codes[nonce];
      });
  
      return r;
    }