nodebb-plugin-markdown 10.1.0 → 11.0.0

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-markdown",
3
- "version": "10.1.0",
3
+ "version": "11.0.0",
4
4
  "description": "A Markdown parser for NodeBB",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -37,7 +37,7 @@
37
37
  "probe-image-size": "^7.2.1"
38
38
  },
39
39
  "nbbpm": {
40
- "compatibility": "^2.4.0"
40
+ "compatibility": "^3.0.0"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@commitlint/cli": "16.2.1",
package/plugin.json CHANGED
@@ -4,8 +4,8 @@
4
4
  "description": "A Markdown parser for NodeBB",
5
5
  "url": "https://github.com/julianlam/nodebb-plugin-markdown",
6
6
  "library": "./index.js",
7
- "less": [
8
- "public/less/default.less"
7
+ "scss": [
8
+ "public/scss/default.scss"
9
9
  ],
10
10
  "scripts": [
11
11
  "public/js/client.js"
@@ -1,4 +1,4 @@
1
- .markdown-highlight {
1
+ @mixin markdown-highlight {
2
2
  margin-top: 1rem;
3
3
  color: inherit;
4
4
  background-color: inherit;
@@ -34,7 +34,7 @@
34
34
 
35
35
  // Backwards compatibility with themes without components
36
36
  .post-content pre, .topic-text pre, .composer .preview pre {
37
- .markdown-highlight;
37
+ @include markdown-highlight;
38
38
  }
39
39
 
40
40
  .markdown-highlight .hljs {
@@ -2,64 +2,64 @@
2
2
  <div class="col-sm-2 col-xs-12 settings-header">General</div>
3
3
  <div class="col-sm-10 col-xs-12">
4
4
  <form class="form markdown-settings">
5
- <div class="panel panel-default">
6
- <div class="panel-heading">Markdown</div>
7
- <div class="panel-body">
5
+ <div class="card">
6
+ <div class="card-header">Markdown</div>
7
+ <div class="card-body">
8
8
  <div class="row">
9
9
  <div class="col-lg-6">
10
- <div class="form-group">
11
- <label for="xhtmlOut">
12
- <input type="checkbox" name="xhtmlOut" id="xhtmlOut" />
10
+ <div class="mb-3 form-check">
11
+ <input type="checkbox" class="form-check-input" name="xhtmlOut" id="xhtmlOut" />
12
+ <label class="form-check-label" for="xhtmlOut">
13
13
  Use '/' to close single tags (<code>&lt;br /&gt;</code>)
14
14
  </label>
15
15
  </div>
16
- <div class="form-group">
17
- <label for="breaks">
18
- <input type="checkbox" name="breaks" id="breaks" />
16
+ <div class="mb-3 form-check">
17
+ <input type="checkbox" class="form-check-input" name="breaks" id="breaks" />
18
+ <label class="form-check-label" for="breaks">
19
19
  Treat newlines as single line breaks
20
20
  </label>
21
21
  </div>
22
- <div class="form-group">
23
- <label for="typographer">
24
- <input type="checkbox" name="typographer" id="typographer" />
22
+ <div class="mb-3 form-check">
23
+ <input type="checkbox" class="form-check-input" name="typographer" id="typographer" />
24
+ <label class="form-check-label" for="typographer">
25
25
  Enable smartypants and other sweet transforms (e.g. <code>(c)</code> &rarr; <code>&copy;</code>)
26
26
  </label>
27
27
  </div>
28
- <div class="form-group">
29
- <label for="multimdTables">
30
- <input type="checkbox" name="multimdTables" id="multimdTables" />
28
+ <div class="mb-3 form-check">
29
+ <input type="checkbox" class="form-check-input" name="multimdTables" id="multimdTables" />
30
+ <label class="form-check-label" for="multimdTables">
31
31
  Allow advanced table syntax
32
32
  </label>
33
33
  </div>
34
34
  </div>
35
35
  <div class="col-lg-6">
36
- <div class="form-group">
37
- <label for="linkify">
38
- <input type="checkbox" name="linkify" id="linkify" />
36
+ <div class="mb-3 form-check">
37
+ <input type="checkbox" class="form-check-input" name="linkify" id="linkify" />
38
+ <label class="form-check-label" for="linkify">
39
39
  Autoconvert url-like texts to links
40
40
  </label>
41
41
  </div>
42
- <div class="form-group">
43
- <label for="externalBlank">
44
- <input type="checkbox" name="externalBlank" id="externalBlank" />
42
+ <div class="mb-3 form-check">
43
+ <input type="checkbox" class="form-check-input" name="externalBlank" id="externalBlank" />
44
+ <label class="form-check-label" for="externalBlank">
45
45
  Open external links in a new tab/window
46
46
  </label>
47
47
  </div>
48
- <div class="form-group">
49
- <label for="nofollow">
50
- <input type="checkbox" name="nofollow" id="nofollow" />
48
+ <div class="mb-3 form-check">
49
+ <input type="checkbox" class="form-check-input" name="nofollow" id="nofollow" />
50
+ <label class="form-check-label" for="nofollow">
51
51
  Tell web crawlers that external links are not to be followed
52
52
  </label>
53
53
  </div>
54
- <div class="form-group">
55
- <label for="allowRTLO">
56
- <input type="checkbox" name="allowRTLO" id="allowRTLO" />
54
+ <div class="mb-3 form-check">
55
+ <input type="checkbox" class="form-check-input" name="allowRTLO" id="allowRTLO" />
56
+ <label class="form-check-label" for="allowRTLO">
57
57
  Allow RTL override unicode in link content
58
58
  </label>
59
59
  </div>
60
- <div class="form-group">
61
- <label for="checkboxes">
62
- <input type="checkbox" name="checkboxes" id="checkboxes" />
60
+ <div class="mb-3 form-check">
61
+ <input type="checkbox" class="form-check-input" name="checkboxes" id="checkboxes" />
62
+ <label class="form-check-label" for="checkboxes">
63
63
  Interpret <code>[ ]</code> and <code>[x]</code> as checkboxes
64
64
  </label>
65
65
  </div>
@@ -69,18 +69,18 @@
69
69
  </div>
70
70
  <div class="row">
71
71
  <div class="col-sm-6">
72
- <div class="panel panel-default">
73
- <div class="panel-heading">Code Formatting</div>
74
- <div class="panel-body">
75
- <div class="form-group">
76
- <label for="highlight">
77
- <input type="checkbox" name="highlight" id="highlight" />
72
+ <div class="card">
73
+ <div class="card-header">Code Formatting</div>
74
+ <div class="card-body">
75
+ <div class="mb-3 form-check">
76
+ <input type="checkbox" class="form-check-input" name="highlight" id="highlight" />
77
+ <label class="form-check-label" for="highlight">
78
78
  Automatically detect and highlight code blocks
79
79
  </label>
80
80
  </div>
81
81
 
82
- <div class="form-group">
83
- <label for="highlightTheme">Use this theme for highlighted code blocks</label>
82
+ <div class="mb-3">
83
+ <label class="form-label" for="highlightTheme">Use this theme for highlighted code blocks</label>
84
84
  <select class="form-control" name="highlightTheme" id="highlightTheme">
85
85
  {{{ each themes }}}
86
86
  <option value="{@value}">{@value}</option>
@@ -88,23 +88,23 @@
88
88
  </select>
89
89
  </div>
90
90
 
91
- <div class="form-group">
92
- <label for="defaultHighlightLanguage">
91
+ <div class="mb-3">
92
+ <label class="form-label" for="defaultHighlightLanguage">
93
93
  Default language for code blocks with no language defined
94
94
  </label>
95
95
  <input class="form-control" placeholder="e.g. js" type="text" name="defaultHighlightLanguage" id="defaultHighlightLanguage" />
96
- <p class="help-block">Leave blank to use auto-language detection</p>
96
+ <p class="form-text">Leave blank to use auto-language detection</p>
97
97
  </div>
98
98
 
99
- <div class="form-group">
100
- <label for="langPrefix">
99
+ <div class="mb-3">
100
+ <label class="form-label" for="langPrefix">
101
101
  Prefix for <code>code</code> blocks
102
102
  </label>
103
103
  <input class="form-control" placeholder="language-" type="text" name="langPrefix" id="langPrefix" />
104
104
  </div>
105
105
 
106
- <div class="form-group">
107
- <label for="highlightLinesLanguageList">
106
+ <div class="mb-3">
107
+ <label class="form-label" for="highlightLinesLanguageList">
108
108
  Enable line numbers for the following languages
109
109
  </label>
110
110
  <select class="form-control" multiple="true" name="highlightLinesLanguageList" id="highlightLinesLanguageList" size="20">
@@ -132,7 +132,7 @@
132
132
  <option value="sql">SQL</option>
133
133
  <option value="shell,console">Shell</option>
134
134
  </select>
135
- <p class="help-block">
135
+ <p class="form-text">
136
136
  You can use <code>ctrl</code> and <code>shift</code> to select/deselect multiple
137
137
  items and select/deselect items in ranges.
138
138
  </p>
@@ -141,41 +141,41 @@
141
141
  </div>
142
142
  </div>
143
143
  <div class="col-sm-6">
144
- <div class="panel panel-default">
145
- <div class="panel-heading">Images</div>
146
- <div class="panel-body">
147
- <div class="checkbox">
148
- <label for="probe">
149
- <input type="checkbox" name="probe" id="probe" />
144
+ <div class="card">
145
+ <div class="card-header">Images</div>
146
+ <div class="card-body">
147
+ <div class="mb-3 form-check">
148
+ <input type="checkbox" class="form-check-input" name="probe" id="probe" />
149
+ <label class="form-check-label" for="probe">
150
150
  Append image sizes for externally linked images
151
151
  </label>
152
152
  </div>
153
- <div class="form-group">
154
- <label for="probeCacheSize">Cache size (number of images)</label>
153
+ <div class="mb-3">
154
+ <label class="form-label" for="probeCacheSize">Cache size (number of images)</label>
155
155
  <input class="form-control" type="number" id="probeCacheSize" name="probeCacheSize" placeholder="256 (Default)" />
156
- <p class="help-block">
156
+ <p class="form-text">
157
157
  Markdown automatically saves image sizes so as to not make too many unnecessary calls. It remembers this value for 24 hours, to a maximum number of images as defined here. Increase this number if your forum posts contain links to many external images.
158
158
  </p>
159
159
  </div>
160
160
  </div>
161
161
  </div>
162
- <div class="panel panel-danger">
163
- <div class="panel-heading">Danger Zone</div>
164
- <div class="panel-body">
165
- <div class="form-group">
166
- <label for="html">
167
- <input type="checkbox" name="html" id="html" />
162
+ <div class="card">
163
+ <div class="card-header bg-danger text-light">Danger Zone</div>
164
+ <div class="card-body">
165
+ <div class="mb-3 form-check">
166
+ <input type="checkbox" class="form-check-input" name="html" id="html" />
167
+ <label class="form-check-label" for="html">
168
168
  Allow HTML
169
169
  </label>
170
- <div class="alert alert-warning">
171
- <strong><i class="icon-warning-sign"></i> Careful!</strong>
172
- <p>
173
- Automatic HTML sanitization is an important part of ensuring that
174
- your users do not run arbitrary javascript or alter parts of the
175
- page that were not meant to be altered. If this option is checked,
176
- beware the consequences!
177
- </p>
178
- </div>
170
+ </div>
171
+ <div class="alert alert-warning">
172
+ <strong><i class="icon-warning-sign"></i> Careful!</strong>
173
+ <p>
174
+ Automatic HTML sanitization is an important part of ensuring that
175
+ your users do not run arbitrary javascript or alter parts of the
176
+ page that were not meant to be altered. If this option is checked,
177
+ beware the consequences!
178
+ </p>
179
179
  </div>
180
180
  </div>
181
181
  </div>