Skip to content

Commit cf2abae

Browse files
committed
Filer 1.0.0-beta2 fix to headings
1 parent 9b27b53 commit cf2abae

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

helpers/userInput.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ export async function chooseHeading(note: TNote, optionAddAtBottom: boolean = tr
260260
}
261261

262262
const result = await CommandBar.showOptions(headingStrings, `Select a heading from note '${note.title ?? 'Untitled'}'`)
263-
let headingToReturn = headingStrings[result.index].trim()
263+
let headingToReturn = headingStrings[result.index].trimLeft() // don't trim right as there can be valid traillng spaces
264264
let newHeading = ''
265265

266266
switch (headingToReturn) {

jgclark.Filer/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# What's changed in 📦 Filer plugin?
22
Please see the [Readme for this plugin](https://github.com/NotePlan/plugins/tree/main/jgclark.Filer) for more details, including the available settings.
33

4+
## [1.0.0-beta2] - 2022-10-28
5+
- fix where trailing spaces on headings would cause data loss when using /move commands
6+
47
## [1.0.0-beta1] - 2022-08-18
58
### Change to Commands
69
- existing command **/move paragraphs** renamed to **/move paragraph or selection**. This moves this paragraph (or selected paragraphs) to a different note

jgclark.Filer/plugin.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"plugin.author": "jgclark",
99
"plugin.url": "https://github.com/NotePlan/plugins/tree/main/jgclark.Filer",
1010
"plugin.changelog": "https://github.com/NotePlan/plugins/blob/main/jgclark.Filer/CHANGELOG.md",
11-
"plugin.version": "1.0.0-beta1",
12-
"plugin.lastUpdateInfo": "Changes '/move paragraph' to work just on current paragraph or selection, while new command '/move block of paragraphs' moves paragraph in the rest of its block as well.",
11+
"plugin.version": "1.0.0-beta2",
12+
"plugin.lastUpdateInfo": "Fix to '/move paragraph' and '/move block of paragraphs' for headings with trailing spaces",
1313
"plugin.dependencies": [],
1414
"plugin.script": "script.js",
1515
"plugin.isRemote": "false",

0 commit comments

Comments
 (0)