File tree Expand file tree Collapse file tree 6 files changed +31
-30
lines changed
Expand file tree Collapse file tree 6 files changed +31
-30
lines changed Original file line number Diff line number Diff line change 1+ .svelte-kit
2+ build
3+ node_modules
4+ coverage
Original file line number Diff line number Diff line change 1- import Markdoc from ' @markdoc/markdoc'
1+ import Markdoc from " @markdoc/markdoc" ;
22
33const 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 ;
Original file line number Diff line number Diff line change 1- import fence from ' ./fence.js'
1+ import fence from " ./fence.js" ;
22
33const nodes = {
44 fence,
5- }
5+ } ;
66
7- export default nodes
7+ export default nodes ;
Original file line number Diff line number Diff line change @@ -9,4 +9,4 @@ export const load: PageLoad = async () => {
99 } catch {
1010 throw error ( 404 ) ;
1111 }
12- } ;
12+ } ;
Original file line number Diff line number Diff line change 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 } */
66const 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 ;
Original file line number Diff line number Diff line change 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
66export default defineConfig ( {
77 plugins : [ sveltekit ( ) ] ,
@@ -15,4 +15,4 @@ export default defineConfig({
1515 ] ,
1616 } ,
1717 } ,
18- } )
18+ } ) ;
You can’t perform that action at this time.
0 commit comments