diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-04-19 15:05:39 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-04-19 15:05:39 +0900 |
| commit | 7a270275efcb49c182db5db73ce10c65ba6ad3ff (patch) | |
| tree | 4eb87d011ec38b23ed123d713b6640cc4ac9e2ea /src/text/html.ts | |
| parent | Add doc (diff) | |
| download | sharkey-7a270275efcb49c182db5db73ce10c65ba6ad3ff.tar.gz sharkey-7a270275efcb49c182db5db73ce10c65ba6ad3ff.tar.bz2 sharkey-7a270275efcb49c182db5db73ce10c65ba6ad3ff.zip | |
Add new text syntax
And some fixes
Diffstat (limited to 'src/text/html.ts')
| -rw-r--r-- | src/text/html.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/text/html.ts b/src/text/html.ts index 797f3b3f33..e2db2457c1 100644 --- a/src/text/html.ts +++ b/src/text/html.ts @@ -54,6 +54,12 @@ const handlers = { document.body.appendChild(blockquote); }, + title({ document }, { title }) { + const h1 = document.createElement('h1'); + h1.textContent = title; + document.body.appendChild(h1); + }, + text({ document }, { content }) { for (const text of content.split('\n')) { const node = document.createTextNode(text); |