From 178b8d15f8615243dcc1df67a74762d4e13cbc70 Mon Sep 17 00:00:00 2001 From: Bill Tulskie Date: Fri, 19 Feb 2021 10:13:40 -0500 Subject: [PATCH 1/3] Update autoclose-html.coffee --- lib/autoclose-html.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/autoclose-html.coffee b/lib/autoclose-html.coffee index 955ae22..5889855 100644 --- a/lib/autoclose-html.coffee +++ b/lib/autoclose-html.coffee @@ -116,6 +116,7 @@ module.exports = if not isInline editor.insertNewline() + editor.backspace() editor.insertNewline() editor.insertText('') if isInline From b80845e69cc2621b8017d28101f7f34b85850f20 Mon Sep 17 00:00:00 2001 From: Bill Tulskie Date: Fri, 19 Feb 2021 13:57:49 -0500 Subject: [PATCH 2/3] Updating version and install instructions for correction to extra indentation on closing tag --- README.md | 13 +++++++++++++ package.json | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cb14f54..3735e3e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Auto Close HTML package for Atom Text Editor Will automatically add closing tags when you complete the opening tag. +Updated to correct extra indentation of closing tags on block elements. # Installation @@ -8,6 +9,18 @@ Install using `apm install autoclose-html` +Until merge of this fork, install as follows: + +1. Uninstall autoclose-html 0.24.0 +2. open a terminal and ... +3. > cd ~/.atom/packages +4. > git clone https://github.com/Ordinal-Data-Inc/autoclose-html.git +5. > cd autoclose-html +6. > npm install +7. > restart Atom +8. Check that Atom > preferences > packages shows autoclose-html 0.24.1 +9. (Optional) Have a sip of coffee + # Usage Under normal circumstances ending tags will be inserted on the same line for inline elements and with `\n\t\n` in between for block elements. This is determined by attaching an element of the given type to the window and checking it's calculated `display` value. diff --git a/package.json b/package.json index b97bc10..75cc921 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "name": "Matt Berkowitz" }, "main": "./lib/autoclose-html", - "version": "0.24.0", + "version": "0.24.1", "private": true, "description": "Automates closing of HTML Tags", "repository": { From cb6f282f05f0712a8ccb3053bf55c831037f1bb2 Mon Sep 17 00:00:00 2001 From: Bill Tulskie Date: Fri, 19 Feb 2021 15:28:30 -0500 Subject: [PATCH 3/3] fix for extra indentation on block close tag. --- README.md | 5 ++++- lib/autoclose-html.coffee | 2 +- package.json | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3735e3e..7f6cc6f 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Install using `apm install autoclose-html` -Until merge of this fork, install as follows: +Until merge of this fork, install using temporary installation process as follows: 1. Uninstall autoclose-html 0.24.0 2. open a terminal and ... @@ -84,3 +84,6 @@ be removed. #### 0.24.0 - Stopped self closing tags from auto closing + +#### 0.24.1 +- Fixes extra indentation on block close tags. Presumes the use of autoindent. diff --git a/lib/autoclose-html.coffee b/lib/autoclose-html.coffee index 5889855..017b37d 100644 --- a/lib/autoclose-html.coffee +++ b/lib/autoclose-html.coffee @@ -116,7 +116,7 @@ module.exports = if not isInline editor.insertNewline() - editor.backspace() + editor.backspace() # corrects extra indentation on block close editor.insertNewline() editor.insertText('') if isInline diff --git a/package.json b/package.json index 75cc921..95b4a0b 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "name": "Matt Berkowitz" }, "main": "./lib/autoclose-html", - "version": "0.24.1", + "version": "0.24.1", "private": true, "description": "Automates closing of HTML Tags", "repository": {