+1
-1
@@ -45,7 +45,7 @@ export async function readFileCloud(
|
||||
`${pagePrefix}${originalUrl.split("/")[0]}/`,
|
||||
);
|
||||
return {
|
||||
data: encoding === "string" ? text : base64EncodedDataUrl(
|
||||
data: encoding === "utf8" ? text : base64EncodedDataUrl(
|
||||
"text/markdown",
|
||||
new TextEncoder().encode(text),
|
||||
),
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import { events } from "$sb/plugos-syscall/mod.ts";
|
||||
import type { Manifest } from "../../common/manifest.ts";
|
||||
import { editor, space, system } from "$sb/silverbullet-syscall/mod.ts";
|
||||
|
||||
import { readYamlPage } from "$sb/lib/yaml_page.ts";
|
||||
import { writePage } from "$sb/silverbullet-syscall/space.ts";
|
||||
|
||||
const plugsPrelude =
|
||||
"This file lists all plugs that SilverBullet will load. Run the {[Plugs: Update]} command to update and reload this list of plugs.\n\n";
|
||||
@@ -82,7 +80,7 @@ export async function updatePlugs() {
|
||||
// console.log("Writing", `_plug/${manifest.name}`);
|
||||
await space.writeAttachment(
|
||||
`_plug/${manifest.name}.plug.json`,
|
||||
"string",
|
||||
"utf8",
|
||||
JSON.stringify(manifest),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -85,8 +85,8 @@ export async function readFileSearch(
|
||||
`;
|
||||
|
||||
return {
|
||||
// encoding === "arraybuffer" is not an option, so either it's "string" or "dataurl"
|
||||
data: encoding === "string" ? text : base64EncodedDataUrl(
|
||||
// encoding === "arraybuffer" is not an option, so either it's "utf8" or "dataurl"
|
||||
data: encoding === "utf8" ? text : base64EncodedDataUrl(
|
||||
"text/markdown",
|
||||
new TextEncoder().encode(text),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user