Skip to content

Commit

Permalink
added pug example
Browse files Browse the repository at this point in the history
  • Loading branch information
therealadityashankar committed Jul 7, 2020
1 parent d5fdae3 commit 6529281
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,22 @@ all language modes/themes are dynamically loaded, and the css is dynamically loa
</body>
```

**Example in pug !**

**JavaScript example**

```pug
doctype html
html(lang="en")
script(type="module" src="https://cdn.jsdelivr.net/gh/vanillawc/[email protected]/build/index.min.js")
body
wc-code(mode="javascript" theme="monokai")
script(type="wc-content").
const resp = await fetch("https://sv443.net/jokeapi/v2/joke/Any?blacklistFlags=nsfw,racist,sexist&format=txt");
const text = await resp.text();
console.log(text);
```

see https://codemirror.net/theme/ for a list of supported themes

## Contributing
Expand Down

0 comments on commit 6529281

Please sign in to comment.