@nerimity/html-embed 1.1.14 → 1.1.16

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/dist/index.js CHANGED
@@ -7,7 +7,7 @@ exports.htmlToJson = htmlToJson;
7
7
  const htm_1 = __importDefault(require("htm"));
8
8
  const css_1 = __importDefault(require("css"));
9
9
  const { validate } = require("csstree-validator");
10
- const allowedTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'img', 'span', 'strong', 'a', "style", "p", "ul", "li", "ol", "table", "thead", "tbody", "tr", "td", "th", "blockquote", "pre", "br"];
10
+ const allowedTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'img', 'span', 'strong', 'a', "style", "p", "ul", "li", "ol", "table", "thead", "tbody", "tr", "td", "th", "blockquote", "pre", "br", 'b', 'i', 'u', 'em', 'small', 'mark', 'sub', 'sup', 'code', 'hr', 'section', 'article', 'header', 'footer', 'nav'];
11
11
  const allowedAttributes = ["href", "src", "color", "style", "class"];
12
12
  const allowedCssProperties = [
13
13
  "background-clip",
package/package.json CHANGED
@@ -1,23 +1,23 @@
1
- {
2
- "name": "@nerimity/html-embed",
3
- "version": "1.1.14",
4
- "description": "",
5
- "main": "dist/index.js",
6
- "scripts": {
7
- "build": "tsc",
8
- "example": "tsc & node example.js"
9
- },
10
- "keywords": [],
11
- "author": "",
12
- "license": "ISC",
13
- "devDependencies": {
14
- "@types/css": "^0.0.37",
15
- "@types/node": "^22.10.10",
16
- "typescript": "^5.5.2"
17
- },
18
- "dependencies": {
19
- "css": "^3.0.0",
20
- "csstree-validator": "^4.0.1",
21
- "htm": "^3.1.0"
22
- }
23
- }
1
+ {
2
+ "name": "@nerimity/html-embed",
3
+ "version": "1.1.16",
4
+ "description": "",
5
+ "main": "dist/index.js",
6
+ "keywords": [],
7
+ "author": "",
8
+ "license": "ISC",
9
+ "devDependencies": {
10
+ "@types/css": "^0.0.37",
11
+ "@types/node": "^22.10.10",
12
+ "typescript": "^5.5.2"
13
+ },
14
+ "dependencies": {
15
+ "css": "^3.0.0",
16
+ "csstree-validator": "^4.0.1",
17
+ "htm": "^3.1.0"
18
+ },
19
+ "scripts": {
20
+ "build": "tsc",
21
+ "example": "tsc & node example.js"
22
+ }
23
+ }
package/src/index.ts CHANGED
@@ -3,7 +3,7 @@ import css from 'css';
3
3
  const {validate} = require("csstree-validator")
4
4
 
5
5
 
6
- const allowedTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'img', 'span', 'strong', 'a', "style", "p", "ul", "li", "ol", "table", "thead", "tbody", "tr", "td", "th", "blockquote", "pre", "br"]
6
+ const allowedTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'img', 'span', 'strong', 'a', "style", "p", "ul", "li", "ol", "table", "thead", "tbody", "tr", "td", "th", "blockquote", "pre", "br", 'b', 'i', 'u', 'em', 'small', 'mark', 'sub', 'sup', 'code', 'hr', 'section', 'article', 'header', 'footer', 'nav'];
7
7
  const allowedAttributes = ["href", "src", "color", "style", "class"]
8
8
  const allowedCssProperties = [
9
9
  "background-clip",
@@ -179,4 +179,4 @@ function cssNameToJsName(name: string) {
179
179
  function jsNameToCssName(name: string)
180
180
  {
181
181
  return name.replace(/([A-Z])/g, "-$1").toLowerCase();
182
- }
182
+ }