defuddle 0.3.0 → 0.3.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/README.md +16 -2
- package/dist/index.js +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -91,11 +91,13 @@ Defuddle attempts to standardize HTML elements to provide a consistent input for
|
|
|
91
91
|
|
|
92
92
|
### Headings
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
- The first H1 or H2 heading is removed if it matches the title.
|
|
95
|
+
- H1s are converted to H2s.
|
|
96
|
+
- Anchor links in H1 to H6 elements are removed and become plain headings.
|
|
95
97
|
|
|
96
98
|
### Code blocks
|
|
97
99
|
|
|
98
|
-
Code block are standardized
|
|
100
|
+
Code block are standardized. If present, line numbers and syntax highlighting are removed, but the language is retained and added as a data attribute and class.
|
|
99
101
|
|
|
100
102
|
```html
|
|
101
103
|
<pre>
|
|
@@ -123,6 +125,18 @@ Inline reference<sup id="fnref:1"><a href="#fn:1">1</a></sup>.
|
|
|
123
125
|
</div>
|
|
124
126
|
```
|
|
125
127
|
|
|
128
|
+
### Math
|
|
129
|
+
|
|
130
|
+
Math elements, including MathJax and KaTeX, are converted to standard MathML:
|
|
131
|
+
|
|
132
|
+
```html
|
|
133
|
+
<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline" data-latex="a \neq 0">
|
|
134
|
+
<mi>a</mi>
|
|
135
|
+
<mo>≠</mo>
|
|
136
|
+
<mn>0</mn>
|
|
137
|
+
</math>
|
|
138
|
+
```
|
|
139
|
+
|
|
126
140
|
## Development
|
|
127
141
|
|
|
128
142
|
### Build
|