From 08131431655c3cce3b59a4cd1ed89d02f2dc345d Mon Sep 17 00:00:00 2001 From: Kyle <41976328+ImKyle4815@users.noreply.github.com> Date: Thu, 25 Feb 2021 10:58:30 -0800 Subject: [PATCH] curly quotes --- creator/index.php | 2 +- js/{creator-9.js => creator-10.js} | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) rename js/{creator-9.js => creator-10.js} (99%) diff --git a/creator/index.php b/creator/index.php index 899eb7f0..350e7490 100644 --- a/creator/index.php +++ b/creator/index.php @@ -440,5 +440,5 @@ include('../globalHTML/header-1.php'); - + \ No newline at end of file diff --git a/js/creator-9.js b/js/creator-10.js similarity index 99% rename from js/creator-9.js rename to js/creator-10.js index 065b39b7..e2b420e5 100644 --- a/js/creator-9.js +++ b/js/creator-10.js @@ -508,7 +508,7 @@ function textboxEditor() { document.querySelector('#textbox-editor-height').onchange = (event) => {selectedTextbox.height = (event.target.value / card.height); textEdited();} } function textEdited() { - card.text[Object.keys(card.text)[selectedTextIndex]].text = document.querySelector('#text-editor').value; + card.text[Object.keys(card.text)[selectedTextIndex]].text = curlyQuotes(document.querySelector('#text-editor').value); drawTextBuffer(); } function drawTextBuffer() { @@ -872,6 +872,9 @@ CanvasRenderingContext2D.prototype.drawImageArc = function(image, x, y, width, h function widthToAngle(width, radius) { return width / radius; } +function curlyQuotes(input) { + return input.replace(/ '/g, ' ‘').replace(/^'/, '‘').replace(/' /g, '’ ').replace(/'$/, '’').replace(/ "/g, ' “').replace(/^"/, '“').replace(/" /g, '” ').replace(/"$/, '”'); +} //ART TAB function uploadArt(imageSource, otherParams) { art.src = imageSource;