From 3a6e18bc619e33140f0dda4ccdbe8b69ab01ea53 Mon Sep 17 00:00:00 2001 From: Patrizio Bekerle Date: Fri, 29 Jun 2018 07:27:46 +0200 Subject: [PATCH] doing case insensitive replace --- selected-markdown-to-bbcode/info.json | 2 +- selected-markdown-to-bbcode/selected-markdown-to-bbcode.qml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/selected-markdown-to-bbcode/info.json b/selected-markdown-to-bbcode/info.json index 286132e..8b0f391 100644 --- a/selected-markdown-to-bbcode/info.json +++ b/selected-markdown-to-bbcode/info.json @@ -4,7 +4,7 @@ "script": "selected-markdown-to-bbcode.qml", "resources": ["panbbcode.lua"], "authors": ["@pbek"], - "version": "0.0.2", + "version": "1.0.3", "minAppVersion": "17.05.8", "description" : "With this script you can right click the selected text and convert it to BBCode Code in the clipboard.\n\nDependencies\nPandoc\npanbbcode.lua (bundled with the script)\n\nInstallation\nAfter you have installed Pandoc you have to configure its path in the script settings." } diff --git a/selected-markdown-to-bbcode/selected-markdown-to-bbcode.qml b/selected-markdown-to-bbcode/selected-markdown-to-bbcode.qml index f665e82..7c6d671 100644 --- a/selected-markdown-to-bbcode/selected-markdown-to-bbcode.qml +++ b/selected-markdown-to-bbcode/selected-markdown-to-bbcode.qml @@ -85,7 +85,7 @@ QtObject { } function replaceAll(str, find, replace) { - return String(str).replace(new RegExp(escapeRegExp(find), 'g'), replace); + return String(str).replace(new RegExp(escapeRegExp(find), 'gi'), replace); } function escapeRegExp(str) {