Skip to content

Commit e6bee89

Browse files
committed
🤕 markt - clean unfound template patterns
1 parent 73365a1 commit e6bee89

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

packages/markt/bin/markt

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env node
22

3+
process.on('unhandledRejection', console.error);
4+
35
const args = require('../args');
46

57
const defaults = {

packages/markt/index.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ const {promisify} = require('util');
22
const read = promisify(require('fs').readFile);
33
const {resolve} = require('path');
44
const marked = promisify(require('marked'));
5-
const phrase = require('paraphrase/double');
5+
const paraphrase = require('paraphrase');
66
const DEFAULT_TEMPLATE = '{{content}}';
77

8+
const phrase = paraphrase(/{{([^{}]*)}}/gm, {clean: true});
9+
810
/**
911
* [description]
1012
* @param {String} content Markdown content

packages/markt/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "markt",
3-
"version": "1.2.1",
3+
"version": "1.2.2",
44
"description": "Generate pages from markdown",
55
"author": "omrilotan",
66
"license": "MIT",
@@ -19,7 +19,7 @@
1919
"dependencies": {
2020
"fs-extra": "^7.0.0",
2121
"marked": "^0.6.0",
22-
"paraphrase": "^1.4.2"
22+
"paraphrase": "^1.7.0"
2323
},
2424
"preferGlobal": true
2525
}

packages/markt/templates/plain.html

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<meta charset="utf-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
66
<title>{{ title }}</title>
7+
<meta name="description" content="{{ description }}">
78
<meta name="viewport" content="width=device-width, initial-scale=1">
89
<meta name="theme-color" content="#FFFFFF"/>
910
<style>

0 commit comments

Comments
 (0)