updated to v1.6.2

This commit is contained in:
Dan Remollino
2023-03-23 15:13:34 -04:00
parent 4a32aa51e9
commit e9bc98484f
3 changed files with 8 additions and 5 deletions

View File

@ -1,3 +1,6 @@
## Version 1.6.2
- fixed FIGlet converted text on indented selections with prepended or appended lines
## Version 1.6.1
- fixed FIGlet converted text output on indented selections
- refactored auto comment code

View File

@ -108,6 +108,10 @@ nova.commands.register('figletTextEditor', editor => {
figletText = linesCommented.join('\n')
}
// prepend/append new lines
if (prependNewLines > 0) figletText = `${'\n'.repeat(prependNewLines)}${figletText}`
if (appendNewLines > 0) figletText = `${figletText}${'\n'.repeat(appendNewLines)}`
if (!indentRange.empty) {
let lines = figletText.split('\n')
let indentText = editor.getTextInRange(indentRange)
@ -121,10 +125,6 @@ nova.commands.register('figletTextEditor', editor => {
figletText = linesIndented.join('\n')
}
// prepend/append new lines
if (prependNewLines > 0) figletText = `${'\n'.repeat(prependNewLines)}${figletText}`
if (appendNewLines > 0) figletText = `${figletText}${'\n'.repeat(appendNewLines)}`
// replace the selection with the fully final FIGlet text
editor.edit(e => { e.replace(range, figletText) })

View File

@ -3,7 +3,7 @@
"name": "FIGlet Text",
"organization": "Dan Remollino",
"description": "Convert selected text to FIGlet. Great for adding readable text to the Minimap, creating l33t text headers, and organizing files.",
"version": "1.6.1",
"version": "1.6.2",
"categories": ["commands", "formatters"],
"entitlements": {