Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filer:move paragraph or selection fails on headers with trailing whitespace #585

Open
2 tasks done
trmax opened this issue Jul 10, 2024 · 0 comments
Open
2 tasks done

Comments

@trmax
Copy link

trmax commented Jul 10, 2024

Checks

  • I confirm I have restarted NotePlan and this problem still persists.
  • Is this a repeatable problem?

Describe the bug
When invoking the plugin and selecting a destination header that happens to end with whitespace, the selected paragraphs are cut but not moved to the destination note.
Cut paragraphs are lost.

What do you expect it to do instead?
With an error, plugin should default to "top of note" or simply do nothing.

To Reproduce
Steps to reproduce the behavior:

  • Create two headers, one with a space at the end, one without a trailing space.
  • action fails on the header with trailing whitespace, succeeds otherwise.

Screenshots
If applicable, add screenshots to help explain your problem.

System

  • Device: Mac, iPhone
  • OS: [e.g. iOS17.5.1, macOS 14.5]
  • NotePlan Version [e.g. 3.12.2]
  • Plugin Name & Version [e.g. "Filer" v1.1.5]

Additional context
Add any other context about the problem here.

Plugin Console Log
To provide us with more clues about where the bug/error is occurring...

  1. Open the Plugin's Preferences by going to NotePlan's menu > Preferences > Plugins and clicking the settings "cog" icon next to the plugin in question. Scroll to the bottom and set the logging level to "DEBUG" and click "Save & Close"
  2. Now open the Plugin Console by going to Noteplan > Help > Plugin Console (not the macOS Console app).
  3. Run the plugin command you're reporting
  4. Copy the output from the Plugin Console and paste it below
  5. Delete any output that has personal information you don't want in there
Executing function 'moveParas'
2024-07-10 08:23:37 | DEBUG | jgclark.Filer v1.1.5 :: moveParas: move current para only
2024-07-10 08:23:37 | DEBUG | folders / filteredFolderList :: Starting to filter the 31 DataStore.folders with inclusions [] exclusions []
2024-07-10 08:23:44 | DEBUG | userInput / chooseHeading :: User picked existing heading number 4 ('test with withspace  ') from 11 ..
2024-07-10 08:23:44 | DEBUG | jgclark.Filer v1.1.5 :: - Moving to note '20240710' under heading: 'test with withspace  '
2024-07-10 08:23:44 | DEBUG | jgclark.Filer v1.1.5 :: -> Inserting at start of section 'test with withspace  '
Error: Couldn't find heading, this is case sensitive. Please check again.
2024-07-10 08:23:44 | DEBUG | jgclark.Filer v1.1.5 :: - Removing 1 paras from original note (which had 59 paras)

Executing function 'moveParas'
2024-07-10 08:31:00 | DEBUG | jgclark.Filer v1.1.5 :: moveParas: move current para only
2024-07-10 08:31:00 | DEBUG | folders / filteredFolderList :: Starting to filter the 31 DataStore.folders with inclusions [] exclusions []
2024-07-10 08:31:04 | DEBUG | userInput / chooseHeading :: User picked existing heading number 3 ('test without whitespace') from 11 ..
2024-07-10 08:31:04 | DEBUG | jgclark.Filer v1.1.5 :: - Moving to note '20240710' under heading: 'test without whitespace'
2024-07-10 08:31:04 | DEBUG | jgclark.Filer v1.1.5 :: -> Inserting at start of section 'test without whitespace'
2024-07-10 08:31:04 | DEBUG | jgclark.Filer v1.1.5 :: - Removing 1 paras from original note (which had 69 paras)
@trmax trmax changed the title move paragraph or selection fails on headers with trailing whitespace Filer:move paragraph or selection fails on headers with trailing whitespace Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant