Last active
February 17, 2019 00:49
-
-
Save gavinmcfarland/4fc172fcf2141d791f185b2e053c88c0 to your computer and use it in GitHub Desktop.
Example using pHTML and Svelte
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** Example using phtml-markdown | |
| https://github.com/phtmlorg/phtml-markdown **/ | |
| // svelt-preprocessor | |
| const options = { | |
| phtml ({ content, filename }) { | |
| return phtmlMarkdown.process(content, { from: filename }).then(result => ({ code: result.html, map: null })); | |
| } | |
| } | |
| // svelte | |
| const processed = await svelte.preprocess(source, { | |
| markup: ({ content }) => phtmlMarkdown.process(content).then(result => ({ code: result.html })) | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment