Spine Runtimes Guide

This guide will teach you how to load, render, and manipulate skeletons in your applications using the Spine Runtimes.

User Guide Search
"; try { const response = await fetch(`https://doxie.marioslab.io/api/search?sourceId=${sourceId}&query=${encodeURIComponent(queryUi.value)}`) if (!response.ok) throw new Error(await response.text()); const results = (await response.json()).results; resultsUi.innerHTML = ""; let i = 0; for (const result of results) { const row = renderResult(result); if (row) { resultsUi.append(row); i++; if (i == 5) break; } } } catch (e) { console.log("Search failed", e); resultsUi.innerHTML = "
Sorry, could not find any results.
" } } function renderResult(result) { const parts = result.text.split("\n\n"); parts.shift(); const text = stripMarkdown(parts.join(" ")); if (text.length == 0) return; const resultUi = document.createElement("div"); resultUi.innerHTML = ` ${result.docTitle}

${text.substring(0, 400)} ...

` resultUi.style.display = "flex"; resultUi.style.flexDirection = "column"; return resultUi; } function stripMarkdown(markdownText) { const htmlText = markdownText .replace(/#/g, "") .replace(/(\*\*|__)(.*?)\1/g, '$2') // Bold **text** or __text__ .replace(/(\*|_)(.*?)\1/g, '$2') // Italic *text* or _text_ .replace(/\~\~(.*?)\~\~/g, '$1') // Strikethrough ~~text~~ .replace(/\!\[[^\]]*\]\([^\)]*\)/g, '') // Remove images ![alt text](image.jpg) .replace(/\[([^\]]*)\]\([^\)]*\)/g, '$1') // Corrected: Remove links [text](http://) but keep the text .replace(/#+\s?(.*?)\n/g, '$1\n') // Remove headers, adjusted to capture text after # .replace(/\n-\s/g, '') // Remove lists .replace(/\n\d+\.\s/g, '') // Remove numbered lists .replace(/\n>/g, '') // Remove blockquotes .replace(/`{3}.*?`{3}/gs, '') // Remove fenced code blocks .replace(/`(.+?)`/g, '$1') // Remove inline code .replace(/\[.*?\]/g, '') .replace(/\n/g, ' '); // Replace new lines with spaces return htmlText.trim(); }