Run prettier.

This commit is contained in:
2024-02-24 11:09:34 -05:00
parent 8e7e0ed490
commit d5267be38c
90 changed files with 5789 additions and 2265 deletions

View File

@ -11,10 +11,13 @@ function markdown(md) {
let node = event.node;
if (event.entering) {
if (node.destination?.startsWith('&')) {
node.destination = '/' + node.destination + '/view?filename=' + node.firstChild?.literal;
node.destination =
'/' + node.destination + '/view?filename=' + node.firstChild?.literal;
} else if (node.type === 'link') {
if (node.destination.indexOf(':') == -1 &&
node.destination.indexOf('/') == -1) {
if (
node.destination.indexOf(':') == -1 &&
node.destination.indexOf('/') == -1
) {
node.destination = `${node.destination}`;
}
}
@ -29,7 +32,9 @@ async function main() {
let wiki_name = request.path.substring(0, slash);
let wiki_doc_name = request.path.substring(slash + 1);
let ids = Object.keys(await ssb.following(await ssb.getOwnerIdentities(), 1));
let ids = Object.keys(
await ssb.following(await ssb.getOwnerIdentities(), 1)
);
let [max_row_id, wikis] = await utils.collection(ids, 'wiki', null, -1, {});
let wiki;
for (let w of Object.values(wikis)) {
@ -40,7 +45,13 @@ async function main() {
}
let wiki_doc;
if (wiki) {
let [max_row_id, wiki_docs] = await utils.collection(ids, 'wiki-doc', wiki.id, -1, {});
let [max_row_id, wiki_docs] = await utils.collection(
ids,
'wiki-doc',
wiki.id,
-1,
{}
);
for (let w of Object.values(wiki_docs)) {
if (w.name === wiki_doc_name && !w.tombstone) {
wiki_doc = w;
@ -70,4 +81,4 @@ async function main() {
});
}
}
main();
main();