respec 29.0.5 → 30.0.1

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": "respec",
3
- "version": "29.0.5",
3
+ "version": "30.0.1",
4
4
  "license": "W3C",
5
5
  "description": "A technical specification pre-processor.",
6
6
  "engines": {
@@ -42,7 +42,7 @@
42
42
  "idb": "^7.0.0",
43
43
  "jasmine": "^4.0.2",
44
44
  "jasmine-core": "^4.0.0",
45
- "karma": "^6.3.12",
45
+ "karma": "^6.3.15",
46
46
  "karma-chrome-launcher": "^3.1.0",
47
47
  "karma-firefox-launcher": "^2.1.2",
48
48
  "karma-jasmine": "^4.0.1",
@@ -53,7 +53,7 @@
53
53
  "pluralize": "^8.0.0",
54
54
  "prettier": "^2.5.1",
55
55
  "prompt": "^1.2.1",
56
- "rollup": "^2.66.1",
56
+ "rollup": "^2.67.1",
57
57
  "rollup-plugin-minify-html-literals": "^1.2.6",
58
58
  "rollup-plugin-terser": "^7.0.2",
59
59
  "serve": "^13.0.2",
@@ -18,7 +18,7 @@ class Renderer extends marked.Renderer {
18
18
  return colors.italic(text);
19
19
  }
20
20
  codespan(text) {
21
- return colors.underline(text);
21
+ return colors.underline(unescape(text));
22
22
  }
23
23
  paragraph(text) {
24
24
  return text;
@@ -26,6 +26,12 @@ class Renderer extends marked.Renderer {
26
26
  link(href, _title, text) {
27
27
  return `[${text}](${colors.blue.dim.underline(href)})`;
28
28
  }
29
+ list(body, _orderered) {
30
+ return `\n${body}`;
31
+ }
32
+ listitem(text) {
33
+ return `* ${text}\n`;
34
+ }
29
35
  }
30
36
 
31
37
  class Logger {
@@ -269,3 +275,24 @@ async function write(destination, html) {
269
275
  }
270
276
  }
271
277
  }
278
+
279
+ /**
280
+ * From https://gist.github.com/WebReflection/df05641bd04954f6d366
281
+ * @param {string} str
282
+ */
283
+ function unescape(str) {
284
+ const re = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34);/g;
285
+ const unescaped = {
286
+ "&": "&",
287
+ "&": "&",
288
+ "&lt;": "<",
289
+ "&#60;": "<",
290
+ "&gt;": ">",
291
+ "&#62;": ">",
292
+ "&apos;": "'",
293
+ "&#39;": "'",
294
+ "&quot;": '"',
295
+ "&#34;": '"',
296
+ };
297
+ return str.replace(re, m => unescaped[m]);
298
+ }