MCPcopy Create free account
hub / github.com/TruthHun/BookStack / uriToZipEntryName

Function uriToZipEntryName

static/word2md/mammoth.browser.js:2109–2117  ·  view source on GitHub ↗
(base, uri)

Source from the content-addressed store, hash-verified

2107exports.replaceFragment = replaceFragment;
2108
2109function uriToZipEntryName(base, uri) {
2110 if (uri.charAt(0) === "/") {
2111 return uri.substr(1);
2112 } else {
2113 // In general, we should check first and second for trailing and leading slashes,
2114 // but in our specific case this seems to be sufficient
2115 return base + "/" + uri;
2116 }
2117}
2118
2119
2120function replaceFragment(uri, fragment) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected