it("supports wikilink with root-relative path",()=>{
constinput=`oh no my banana I bought on [[journal/monday]] has gone off! I’m taking it back to the [[other/shop]] for a refund`;
constexpected=`<p>oh no my banana I bought on <a class="reference-link" href="journal/monday">journal/monday</a> has gone off! I’m taking it back to the <a class="reference-link" href="other/shop">other/shop</a> for a refund</p>`;
constexpected=`<p>oh no my banana I bought on <a class="reference-link" href="/journal/monday">journal/monday</a> has gone off! I’m taking it back to the <a class="reference-link" href="/other/shop">other/shop</a> for a refund</p>`;
// make sure that the meta file is loaded before the rest of the files is processed.
if(filePath==="!!!meta.json"){
constcontent=awaitreadContent(zipfile,entry);
metaFile=JSON.parse(content.toString("utf-8"));
}
// determine the root of the .zip (i.e. if it has only one top-level folder then the root is that folder, or the root of the archive if there are multiple top-level folders).