pragma Singleton import Quickshell Singleton { id: root function shortText(str, len = 25) { if (!str) return "" return str.length > len ? str.slice(0, len) + "..." : str } function verticalize(text) { return text.split("").join("\n") } function markdownToHtml(md) { if (!md) return ""; let html = md .replace(/&/g, "&") .replace(//g, ">") .replace(/\*\*(.*?)\*\*/g, "$1") // bold .replace(/\*(.*?)\*/g, "$1") // italic .replace(/`([^`]+)`/g, "$1") // inline code .replace(/^### (.*)$/gm, "

$1

") // headers .replace(/```([\s\S]+?)```/g, '
$1
') // code blocks .replace(/^## (.*)$/gm, "

$1

") .replace(/^# (.*)$/gm, "

$1

") .replace(/^- (.*)$/gm, "
  • $1
  • "); // simple lists // Wrap list items in