Fix conversion, add missing ruby tag

main
Elnu 1 year ago
parent 38de7518ec
commit bbf67917ff

@ -62,7 +62,7 @@
const output = document.getElementById("output"); const output = document.getElementById("output");
const copyButton = document.getElementById("copy"); const copyButton = document.getElementById("copy");
input.addEventListener("keyup", e => { input.addEventListener("keyup", e => {
output.value = `<span lang="ja">${input.value.replace(/\[([^\]]*)]{([^\}]*)}/g, "$1<rp>(</rp><rt>$2</rt><rp>)</rp>")}</span>`; output.value = `<span lang="ja">${input.value.replace(/\[([^\]]*)]{([^\}]*)}/g, "<ruby>$1<rp>(</rp><rt>$2</rt><rp>)</rp></ruby>")}</span>`;
copyButton.innerHTML = "Copy"; copyButton.innerHTML = "Copy";
}); });
copyButton.addEventListener("click", e => { copyButton.addEventListener("click", e => {

Loading…
Cancel
Save