forked from LiveCarta/BookConverter
Change structure of presets.json
This commit is contained in:
@@ -3,7 +3,10 @@
|
|||||||
"preset_name": "table_wrapper",
|
"preset_name": "table_wrapper",
|
||||||
"rules": [
|
"rules": [
|
||||||
{
|
{
|
||||||
"tags": ["div"],
|
"tags": ["^div$"],
|
||||||
|
"condition": {
|
||||||
|
"parent_tags": null,
|
||||||
|
"child_tags": null,
|
||||||
"attrs": [
|
"attrs": [
|
||||||
{
|
{
|
||||||
"name": "width",
|
"name": "width",
|
||||||
@@ -18,9 +21,13 @@
|
|||||||
"value": ".*"
|
"value": ".*"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"tags": ["section", "blockquote"],
|
"tags": ["^section$", "^blockquote$"],
|
||||||
|
"condition": {
|
||||||
|
"parent_tags": null,
|
||||||
|
"child_tags": null,
|
||||||
"attrs": [
|
"attrs": [
|
||||||
{
|
{
|
||||||
"name": "class",
|
"name": "class",
|
||||||
@@ -28,6 +35,7 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -75,7 +83,7 @@
|
|||||||
{
|
{
|
||||||
"attr": "xlink:href",
|
"attr": "xlink:href",
|
||||||
"condition": {
|
"condition": {
|
||||||
"tags": ["img"]
|
"tags": ["^img$"]
|
||||||
},
|
},
|
||||||
"attr_to_replace": "src"
|
"attr_to_replace": "src"
|
||||||
}
|
}
|
||||||
@@ -83,27 +91,37 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"preset_name": "unwrapper",
|
"preset_name": "unwrapper",
|
||||||
"rules": {
|
"rules": [
|
||||||
|
{
|
||||||
"tags": [
|
"tags": [
|
||||||
"section",
|
"^section$",
|
||||||
"article",
|
"^article$",
|
||||||
"figcaption",
|
"^figcaption$",
|
||||||
"main",
|
"^main$",
|
||||||
"body",
|
"^body$",
|
||||||
"html",
|
"^html$",
|
||||||
"svg",
|
"^svg$"
|
||||||
"li > p"
|
],
|
||||||
]
|
"condition": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tags": ["^p$"],
|
||||||
|
"condition": {
|
||||||
|
"parent_tags": "li",
|
||||||
|
"child_tags": null,
|
||||||
|
"attrs": null
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"preset_name": "inserter",
|
"preset_name": "inserter",
|
||||||
"rules": [
|
"rules": [
|
||||||
{
|
{
|
||||||
"tags": ["pre"],
|
"tags": ["^pre$"],
|
||||||
"condition": {
|
"condition": {
|
||||||
"parent_tags": null,
|
"parent_tags": null,
|
||||||
"child_tags": ":not(code, kbd, var)",
|
"child_tags": ":not(:has(code, kbd, var))",
|
||||||
"attrs": null
|
"attrs": null
|
||||||
},
|
},
|
||||||
"tag_to_insert": "code"
|
"tag_to_insert": "code"
|
||||||
|
|||||||
Reference in New Issue
Block a user