Skip to content

Commit e64e1e8

Browse files
committed
🎨 Prettify
1 parent 1c72aaf commit e64e1e8

File tree

6 files changed

+31
-30
lines changed

6 files changed

+31
-30
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.svelte-kit
2+
build
3+
node_modules
4+
coverage
Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import Markdoc from '@markdoc/markdoc'
1+
import Markdoc from "@markdoc/markdoc";
22

33
const fence = {
4-
render: 'CodeBlock',
4+
render: "CodeBlock",
55
attributes: {
66
content: {
77
type: String,
@@ -11,24 +11,21 @@ const fence = {
1111
},
1212
process: {
1313
...Markdoc.nodes.fence.attributes.process,
14-
default: false
14+
default: false,
1515
},
1616
},
1717
async transform(node, config) {
18-
const attributes = node.transformAttributes(config)
19-
const children = node.transformChildren(config)
20-
const code =
21-
children.length > 0
22-
? children.join()
23-
: attributes.content
18+
const attributes = node.transformAttributes(config);
19+
const children = node.transformChildren(config);
20+
const code = children.length > 0 ? children.join() : attributes.content;
2421

25-
const codeWithoutEmptyLastLine = code.replace(/\n$/, '')
22+
const codeWithoutEmptyLastLine = code.replace(/\n$/, "");
2623

2724
return new Markdoc.Tag(this.render, {
2825
lang: attributes.language,
2926
code: codeWithoutEmptyLastLine,
30-
})
27+
});
3128
},
32-
}
29+
};
3330

34-
export default fence
31+
export default fence;
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import fence from './fence.js'
1+
import fence from "./fence.js";
22

33
const nodes = {
44
fence,
5-
}
5+
};
66

7-
export default nodes
7+
export default nodes;

‎packages/docs/src/routes/+page.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ export const load: PageLoad = async () => {
99
} catch {
1010
throw error(404);
1111
}
12-
};
12+
};
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
import adapter from '@sveltejs/adapter-static'
2-
import { sveltePreprocess } from 'svelte-preprocess'
3-
import { markdocPreprocess } from 'markdoc-svelte'
1+
import adapter from "@sveltejs/adapter-static";
2+
import { sveltePreprocess } from "svelte-preprocess";
3+
import { markdocPreprocess } from "markdoc-svelte";
44

55
/** @type {import('@sveltejs/kit').Config} */
66
const config = {
7-
extensions: ['.svelte', '.mdoc'],
7+
extensions: [".svelte", ".mdoc"],
88
preprocess: [
99
markdocPreprocess({
1010
extensions: [".mdoc"],
11-
schema: './markdoc',
11+
schema: "./markdoc",
1212
typographer: true,
1313
}),
1414
sveltePreprocess(),
1515
],
1616
kit: {
1717
adapter: adapter({
18-
fallback: '404.html',
18+
fallback: "404.html",
1919
}),
2020
},
21-
}
21+
};
2222

23-
export default config
23+
export default config;

‎packages/docs/vite.config.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { sveltekit } from '@sveltejs/kit/vite'
2-
import { defineConfig } from 'vite'
3-
import tailwindcss from 'tailwindcss'
4-
import autoprefixer from 'autoprefixer'
1+
import { sveltekit } from "@sveltejs/kit/vite";
2+
import { defineConfig } from "vite";
3+
import tailwindcss from "tailwindcss";
4+
import autoprefixer from "autoprefixer";
55

66
export default defineConfig({
77
plugins: [sveltekit()],
@@ -15,4 +15,4 @@ export default defineConfig({
1515
],
1616
},
1717
},
18-
})
18+
});

0 commit comments

Comments
 (0)