.+))?)|(?```\s?(?.+)?)|(###\s?(?.+))|(##\s?(?.+))|(#\s?(?.+))|(\*\s?(?
.+))|(>\s?(?.+))|(?(.+)?))$/;
+export const tokenize = (gemtext) =>
+ gemtext.split("\n").map((line) => GMI_REGEX.exec(line).groups);
export function block(
{ text, href, title, pre, alt, h1, h2, h3, li, quote },
@@ -94,7 +96,7 @@ export function body(tokens, options) {
}
export function toHTML(gemtext, options) {
- const tokens = gemtext.split("\n").map((line) => GMI_REGEX.exec(line).groups);
+ const tokens = tokenize(gemtext);
if (options.body) return body(tokens, options);
@@ -118,12 +120,9 @@ ${body(tokens, options)}
export function head(options) {
return `
-
-${
- options.schemes || options.css === "full"
- ? `\n`
- : ""
-}${CSS.style(options)}
+${CSS.style(
+ options
+ )}
${options.title}${
!options.author ? "" : `\n`
}${
diff --git a/package-lock.json b/package-lock.json
index 42eee59..47b8d31 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "gmi-web-cli",
- "version": "1.0.11-rc.2",
+ "version": "1.0.0-rc.3",
"lockfileVersion": 1,
"requires": true,
"dependencies": {