From 56557cd425f44592398b8e97b6f1e42a917ba86d Mon Sep 17 00:00:00 2001 From: Margus Holland Date: Fri, 3 Feb 2017 10:40:01 +0200 Subject: [PATCH] Fixes #11 --- .../Contents/Sketch/manifest.json | 4 ++-- .../Contents/Sketch/script.cocoascript | 17 +---------------- README.md | 4 ++++ 3 files changed, 7 insertions(+), 18 deletions(-) diff --git a/Comma.sketchplugin/Contents/Sketch/manifest.json b/Comma.sketchplugin/Contents/Sketch/manifest.json index fdf867f..79f804b 100644 --- a/Comma.sketchplugin/Contents/Sketch/manifest.json +++ b/Comma.sketchplugin/Contents/Sketch/manifest.json @@ -98,9 +98,9 @@ "title": "Comma" }, "identifier": "com.margusholland.commafucker", - "version": "1.1.2", + "version": "1.1.3", "description": "Set of commands to clean up and modify text layers.", "authorEmail": "margusholland@me.com", "name": "Comma", - "compatibleVersion": "3.8" + "compatibleVersion": "42" } \ No newline at end of file diff --git a/Comma.sketchplugin/Contents/Sketch/script.cocoascript b/Comma.sketchplugin/Contents/Sketch/script.cocoascript index 8da0c63..6a78836 100644 --- a/Comma.sketchplugin/Contents/Sketch/script.cocoascript +++ b/Comma.sketchplugin/Contents/Sketch/script.cocoascript @@ -1,5 +1,5 @@ var toJSArray = function(obj) { - var l = obj.count() + var l = obj.count var r = []; for (var i=0; i < l; i++) { r.push(obj.objectAtIndex(i)) @@ -141,21 +141,6 @@ var onRemoveDoubleSpaces = function(context) { } } -/* var onCurlyQuotes = function(context) { - layers = layers(context) - for (var i=0; i < [layers count]; i++) { - var item = [layers objectAtIndex:i] - if ([[item class] isEqual:[MSTextLayer class]]) { - var string = [item stringValue] - string = string.replace(/(^\")/gi, '“'); - string = string.replace(/( \")/gi, ' “'); - string = string.replace(/\"/g, '”'); - item.setStringValue(string) - moveLayer(item) - } - } -} */ - var onSingleSpaceAfterPunctuation = function(context) { layers = layers(context) for (var i=0; i < [layers count]; i++) { diff --git a/README.md b/README.md index 90d1594..137f004 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,10 @@ Select text layers, layer groups or artboards to change the text. Following comm # Change log +## v.1.1.3 (Sketch 42 compatibility) +* Fixes issues with Sketch 42 +NB! Might not be backwards compatible, don’t have any earlier version to test on + ## v.1.1.2 (Sketch 3.8.X compatibility) * Fixes issues with Sketch 3.8 and later