From b7d95b34f089f0c74e184b4edcafe6c2028dcc60 Mon Sep 17 00:00:00 2001 From: Stanislav A Date: Mon, 5 Jun 2023 20:47:58 +0300 Subject: [PATCH] revert md changes --- src/scriptlets/remove-node-text.js | 26 ++++++++++++--------- src/scriptlets/trusted-replace-node-text.js | 26 ++++++++++++--------- 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/src/scriptlets/remove-node-text.js b/src/scriptlets/remove-node-text.js index b37d006fd..47d99c47e 100644 --- a/src/scriptlets/remove-node-text.js +++ b/src/scriptlets/remove-node-text.js @@ -23,19 +23,22 @@ import { * Related UBO scriptlet: * https://github.com/gorhill/uBlock/commit/2bb446797a12086f2eebc0c8635b671b8b90c477 * - * **Syntax** - * ``` + * ### Syntax + * + * ```adblock * example.org#%#//scriptlet('remove-node-text', nodeName, condition) * ``` * - * - `nodeName` — required, string or RegExp, specifies DOM node name from which the text will be removed. Must target lowercased node names, - * e.g `div` instead of `DIV`. - * - `textMatch` — required, string or RegExp to match against node's text content. If matched, the whole text will be removed. - * Case sensitive. + * - `nodeName` — required, string or RegExp, specifies DOM node name from which the text will be removed. + * Must target lowercased node names, e.g `div` instead of `DIV`. + * - `textMatch` — required, string or RegExp to match against node's text content. + * If matched, the whole text will be removed. Case sensitive. * - * **Examples** - * 1. Remove node's text content: - * ``` + * ### Examples + * + * 1. Remove node's text content: + * + * ```adblock * example.org#%#//scriptlet('remove-node-text', 'div', 'some text') * ``` * @@ -49,8 +52,9 @@ import { * some text * ``` * - * 2. Remove node's text content, matching both node name and condition by RegExp: - * ``` + * 2. Remove node's text content, matching both node name and condition by RegExp: + * + * ```adblock * example.org#%#//scriptlet('remove-node-text', '/[a-z]*[0-9]/', '/text/') * ``` * diff --git a/src/scriptlets/trusted-replace-node-text.js b/src/scriptlets/trusted-replace-node-text.js index 1e7f081e7..c4ee7fed1 100644 --- a/src/scriptlets/trusted-replace-node-text.js +++ b/src/scriptlets/trusted-replace-node-text.js @@ -23,21 +23,24 @@ import { * Related UBO scriptlet: * https://github.com/gorhill/uBlock/commit/41876336db48 * - * **Syntax** - * ``` + * ### Syntax + * + * ```adblock * example.org#%#//scriptlet('trusted-replace-node-text', nodeName, condition) * ``` * - * - `nodeName` — required, string or RegExp, specifies DOM node name from which the text will be removed. Must target lowercased node names, - * e.g `div` instead of `DIV`. - * - `textMatch` — required, string or RegExp to match against node's text content. If matched, the whole text will be removed. - * Case sensitive. + * - `nodeName` — required, string or RegExp, specifies DOM node name from which the text will be removed. + * Must target lowercased node names, e.g `div` instead of `DIV`. + * - `textMatch` — required, string or RegExp to match against node's text content. + * If matched, the whole text will be removed. Case sensitive. * - `pattern` — required, string or regexp for matching contents of `node.textContent` that should be replaced. * - `replacement` — required, string to replace text content matched by `pattern`. * - * **Examples** - * 1. Replace node's text content: - * ``` + * ### Examples + * + * 1. Replace node's text content: + * + * ```adblock * example.org#%#//scriptlet('trusted-replace-node-text', 'div', 'some', 'text', 'other text') * ``` * @@ -53,8 +56,9 @@ import { * some text * ``` * - * 2. Replace node's text content, matching both node name, text and pattern by RegExp: - * ``` + * 2. Replace node's text content, matching both node name, text and pattern by RegExp: + * + * ```adblock * example.org#%#//scriptlet('trusted-replace-node-text', '/[a-z]*[0-9]/', '/s\dme/', '/t\dxt/', 'other text') * ``` *