@mryhryki/markdown-preview 0.8.13 → 0.8.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +11 -16
- package/src/lib/params.test.js +10 -9
- package/src/lib/socket_manager.test.js +15 -14
- package/static/convert-markdown.js +13998 -11396
- package/static/highlightjs-github-dark-dimmed.css +117 -0
- package/template/default.html +4 -5
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
pre code.hljs {
|
|
2
|
+
display: block;
|
|
3
|
+
overflow-x: auto;
|
|
4
|
+
padding: 1em
|
|
5
|
+
}
|
|
6
|
+
code.hljs {
|
|
7
|
+
padding: 3px 5px
|
|
8
|
+
}
|
|
9
|
+
/*!
|
|
10
|
+
Theme: GitHub Dark Dimmed
|
|
11
|
+
Description: Dark dimmed theme as seen on github.com
|
|
12
|
+
Author: github.com
|
|
13
|
+
Maintainer: @Hirse
|
|
14
|
+
Updated: 2021-05-15
|
|
15
|
+
|
|
16
|
+
Colors taken from GitHub's CSS
|
|
17
|
+
*/
|
|
18
|
+
.hljs {
|
|
19
|
+
color: #adbac7;
|
|
20
|
+
background: #22272e
|
|
21
|
+
}
|
|
22
|
+
.hljs-doctag,
|
|
23
|
+
.hljs-keyword,
|
|
24
|
+
.hljs-meta .hljs-keyword,
|
|
25
|
+
.hljs-template-tag,
|
|
26
|
+
.hljs-template-variable,
|
|
27
|
+
.hljs-type,
|
|
28
|
+
.hljs-variable.language_ {
|
|
29
|
+
/* prettylights-syntax-keyword */
|
|
30
|
+
color: #f47067
|
|
31
|
+
}
|
|
32
|
+
.hljs-title,
|
|
33
|
+
.hljs-title.class_,
|
|
34
|
+
.hljs-title.class_.inherited__,
|
|
35
|
+
.hljs-title.function_ {
|
|
36
|
+
/* prettylights-syntax-entity */
|
|
37
|
+
color: #dcbdfb
|
|
38
|
+
}
|
|
39
|
+
.hljs-attr,
|
|
40
|
+
.hljs-attribute,
|
|
41
|
+
.hljs-literal,
|
|
42
|
+
.hljs-meta,
|
|
43
|
+
.hljs-number,
|
|
44
|
+
.hljs-operator,
|
|
45
|
+
.hljs-variable,
|
|
46
|
+
.hljs-selector-attr,
|
|
47
|
+
.hljs-selector-class,
|
|
48
|
+
.hljs-selector-id {
|
|
49
|
+
/* prettylights-syntax-constant */
|
|
50
|
+
color: #6cb6ff
|
|
51
|
+
}
|
|
52
|
+
.hljs-regexp,
|
|
53
|
+
.hljs-string,
|
|
54
|
+
.hljs-meta .hljs-string {
|
|
55
|
+
/* prettylights-syntax-string */
|
|
56
|
+
color: #96d0ff
|
|
57
|
+
}
|
|
58
|
+
.hljs-built_in,
|
|
59
|
+
.hljs-symbol {
|
|
60
|
+
/* prettylights-syntax-variable */
|
|
61
|
+
color: #f69d50
|
|
62
|
+
}
|
|
63
|
+
.hljs-comment,
|
|
64
|
+
.hljs-code,
|
|
65
|
+
.hljs-formula {
|
|
66
|
+
/* prettylights-syntax-comment */
|
|
67
|
+
color: #768390
|
|
68
|
+
}
|
|
69
|
+
.hljs-name,
|
|
70
|
+
.hljs-quote,
|
|
71
|
+
.hljs-selector-tag,
|
|
72
|
+
.hljs-selector-pseudo {
|
|
73
|
+
/* prettylights-syntax-entity-tag */
|
|
74
|
+
color: #8ddb8c
|
|
75
|
+
}
|
|
76
|
+
.hljs-subst {
|
|
77
|
+
/* prettylights-syntax-storage-modifier-import */
|
|
78
|
+
color: #adbac7
|
|
79
|
+
}
|
|
80
|
+
.hljs-section {
|
|
81
|
+
/* prettylights-syntax-markup-heading */
|
|
82
|
+
color: #316dca;
|
|
83
|
+
font-weight: bold
|
|
84
|
+
}
|
|
85
|
+
.hljs-bullet {
|
|
86
|
+
/* prettylights-syntax-markup-list */
|
|
87
|
+
color: #eac55f
|
|
88
|
+
}
|
|
89
|
+
.hljs-emphasis {
|
|
90
|
+
/* prettylights-syntax-markup-italic */
|
|
91
|
+
color: #adbac7;
|
|
92
|
+
font-style: italic
|
|
93
|
+
}
|
|
94
|
+
.hljs-strong {
|
|
95
|
+
/* prettylights-syntax-markup-bold */
|
|
96
|
+
color: #adbac7;
|
|
97
|
+
font-weight: bold
|
|
98
|
+
}
|
|
99
|
+
.hljs-addition {
|
|
100
|
+
/* prettylights-syntax-markup-inserted */
|
|
101
|
+
color: #b4f1b4;
|
|
102
|
+
background-color: #1b4721
|
|
103
|
+
}
|
|
104
|
+
.hljs-deletion {
|
|
105
|
+
/* prettylights-syntax-markup-deleted */
|
|
106
|
+
color: #ffd8d3;
|
|
107
|
+
background-color: #78191b
|
|
108
|
+
}
|
|
109
|
+
.hljs-char.escape_,
|
|
110
|
+
.hljs-link,
|
|
111
|
+
.hljs-params,
|
|
112
|
+
.hljs-property,
|
|
113
|
+
.hljs-punctuation,
|
|
114
|
+
.hljs-tag {
|
|
115
|
+
/* purposely ignored */
|
|
116
|
+
|
|
117
|
+
}
|
package/template/default.html
CHANGED
|
@@ -5,12 +5,11 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Markdown Preview</title>
|
|
7
7
|
<link rel="stylesheet" href="/github-markdown.css" />
|
|
8
|
-
<link rel="stylesheet" href="/highlightjs-github.css" />
|
|
8
|
+
<link rel="stylesheet" href="/highlightjs-github.css" media="(prefers-color-scheme: light)" />
|
|
9
|
+
<link rel="stylesheet" href="/highlightjs-github-dark-dimmed.css" media="(prefers-color-scheme: dark)" />
|
|
9
10
|
</head>
|
|
10
|
-
<body style="box-sizing: border-box; min-width: 200px; max-width: 980px; margin: 0 auto; padding: 45px">
|
|
11
|
-
<div
|
|
12
|
-
<div id="content"></div>
|
|
13
|
-
</div>
|
|
11
|
+
<body class="markdown-body" style="box-sizing: border-box; min-width: 200px; max-width: 980px; margin: 0 auto; padding: 45px">
|
|
12
|
+
<div id="content"></div>
|
|
14
13
|
<script type="module">
|
|
15
14
|
import { connectMarkdownPreview } from "/markdown-preview-websocket.js";
|
|
16
15
|
import { convertMarkdownToHtml } from "/convert-markdown.js";
|