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