updated to v1.10.1
This commit is contained in:
		| @@ -1,3 +1,6 @@ | ||||
| ## Version 1.10.1 | ||||
| - fixed right border not vertically aligning for some characters | ||||
|  | ||||
| ## Version 1.10 | ||||
| - added Borders option to add custom borders | ||||
| - added Padding option to adjust spacing between outputted text and borders | ||||
|   | ||||
| @@ -149,18 +149,20 @@ nova.commands.register('figletTextEditor', editor => { | ||||
|                         switch (border) { | ||||
|                             case 'left': | ||||
|                                 figletTextArr = figletTextArr.map(line => { | ||||
|                                     if (!/^\s+$/.test(line)) return `${' '.repeat(borders[border].padding)}${line}` | ||||
|                                     if (!/^\s+$/.test(line)) return `${' '.repeat(borders.left.padding)}${line}` | ||||
|                                 }) | ||||
|                                 break | ||||
|                             case 'right': | ||||
|                                 figletTextArr = figletTextArr.map(line => { | ||||
|                                     if (!/^\s+$/.test(line)) return `${line}${' '.repeat(borders[border].padding)}` | ||||
|                                     let additionalRightPadding = (borders.left.padding + longestLine + borders.right.padding) - (borders.left.padding + line.length + borders.right.padding) | ||||
|                                     if ( additionalRightPadding > 0) line = `${line}${' '.repeat(additionalRightPadding)}` | ||||
|                                     if (!/^\s+$/.test(line)) return `${line}${' '.repeat(borders.right.padding)}` | ||||
|                                 }) | ||||
|                                 break | ||||
|                             case 'top': | ||||
|                                 if (borders.left.width === 0 && borders.right.width === 0) { | ||||
|                                     // subtract one; will Array.prototype.join('\n') before final editor output | ||||
|                                     borderBuffer.paddingTop.push([`${'\n'.repeat(borders[border].padding - 1)}`]) | ||||
|                                     borderBuffer.paddingTop.push([`${'\n'.repeat(borders.top.padding - 1)}`]) | ||||
|                                 } else { | ||||
|                                     for (let count = borders.top.padding; count; count--) { | ||||
|                                         borderBuffer.paddingTop.push( | ||||
| @@ -172,7 +174,7 @@ nova.commands.register('figletTextEditor', editor => { | ||||
|                             case 'bottom': | ||||
|                                 if (borders.left.width === 0 && borders.right.width === 0) { | ||||
|                                     // subtract one; will Array.prototype.join('\n') before final editor output | ||||
|                                     borderBuffer.paddingBottom.push([`${'\n'.repeat(borders[border].padding - 1)}`]) | ||||
|                                     borderBuffer.paddingBottom.push([`${'\n'.repeat(borders.bottom.padding - 1)}`]) | ||||
|                                 } else { | ||||
|                                     for (let count = borders.bottom.padding; count; count--) { | ||||
|                                         borderBuffer.paddingBottom.push( | ||||
|   | ||||
| @@ -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.10", | ||||
|     "version": "1.10.1", | ||||
|     "categories": ["commands", "formatters"], | ||||
|  | ||||
|     "entitlements": { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user