@xiee/utils 1.1.14 → 1.2.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/README.md CHANGED
@@ -70,6 +70,11 @@ style the notes or hide/show them as you wish.
70
70
  Add anchor links to all section headers (e.g., `<h2>`) that have nonempty `id`
71
71
  attributes.
72
72
 
73
+ ## load-highlight.js
74
+
75
+ Disable highlight.js's auto language detection, and then apply highlighting.
76
+ This requires highlight.js to be loaded in advance.
77
+
73
78
  ## math-code.js
74
79
 
75
80
  Write LaTeX math expressions (`$\alpha$`) in `<code></code` in HTML or a pair of
package/js/center-img.js CHANGED
@@ -27,4 +27,9 @@
27
27
  for (var i = 0; i < tagNames.length; i++) {
28
28
  center_el(tagNames[i]);
29
29
  }
30
+ // also center paragraphs that contain `* * *`
31
+ var ps = document.getElementsByTagName('p');
32
+ for (var i = 0; i < ps.length; i++) {
33
+ if (ps[i].innerText === '* * *') ps[i].style.textAlign = 'center';
34
+ };
30
35
  })();
@@ -0,0 +1,4 @@
1
+ (function() {
2
+ hljs.configure({languages: []});
3
+ hljs.highlightAll ? hljs.highlightAll() : hljs.initHighlightingOnLoad();
4
+ })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xiee/utils",
3
- "version": "1.1.14",
3
+ "version": "1.2.0",
4
4
  "description": "Miscellaneous tools and utilities to manipulate HTML pages",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"