From 7a270275efcb49c182db5db73ce10c65ba6ad3ff Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 19 Apr 2018 15:05:39 +0900 Subject: Add new text syntax And some fixes --- src/text/html.ts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/text/html.ts') 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); -- cgit v1.2.3-freya