Skip to content

Commit 6529281

Browse files
added pug example
1 parent d5fdae3 commit 6529281

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,22 @@ all language modes/themes are dynamically loaded, and the css is dynamically loa
9696
</body>
9797
```
9898

99+
**Example in pug !**
100+
101+
**JavaScript example**
102+
103+
```pug
104+
doctype html
105+
html(lang="en")
106+
script(type="module" src="https://cdn.jsdelivr.net/gh/vanillawc/wc-code@0.2.1/build/index.min.js")
107+
body
108+
wc-code(mode="javascript" theme="monokai")
109+
script(type="wc-content").
110+
const resp = await fetch("https://sv443.net/jokeapi/v2/joke/Any?blacklistFlags=nsfw,racist,sexist&format=txt");
111+
const text = await resp.text();
112+
console.log(text);
113+
```
114+
99115
see https://codemirror.net/theme/ for a list of supported themes
100116

101117
## Contributing

0 commit comments

Comments
 (0)