mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2024-12-11 17:07:07 +01:00
[chore] Add JSDoc
This commit is contained in:
parent
80f91d129e
commit
9c379125be
@ -18,8 +18,13 @@ function sanitizeInlineQuotationOnCopy() {
|
|||||||
const range = selection.getRangeAt(0).cloneContents();
|
const range = selection.getRangeAt(0).cloneContents();
|
||||||
const tempDOM = document.createDocumentFragment();
|
const tempDOM = document.createDocumentFragment();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Process a node, transforming <q> elements to <span> elements and preserving children.
|
||||||
|
* @param {Node} node Input node
|
||||||
|
* @returns {Node} Processed node
|
||||||
|
*/
|
||||||
function processNode(node) {
|
function processNode(node) {
|
||||||
if (node.nodeType === Node.ELEMENT_NODE && node.tagName.toLowerCase() === 'q') {
|
if (node.nodeType === Node.ELEMENT_NODE && node.nodeName.toLowerCase() === 'q') {
|
||||||
// Transform <q> to <span>, preserve children
|
// Transform <q> to <span>, preserve children
|
||||||
const span = document.createElement('span');
|
const span = document.createElement('span');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user