removeParagraphs() API not always working
@EduardMe ci sta già lavorando.
Dal 14/3/2024.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Checks
- I confirm I have restarted NotePlan and this problem still persists.
- Is this a repeatable problem?
Describe the bug
Sometimes this line doesn't work (from jgclark.Filer/src/moveItems.js):
note.removeParagraphs(parasInBlock)
I cannot see any pattern to when this doesn't happen.
Note that I have added some logic now to flag up when this happens, by testing the number of lines in note before and after this call. See this example:
Plugin Console Log
This is the output from 3 successive examples of calling /moveParas on the same single line in the same note:
Executing function 'moveParasToTomorrow'
2024-03-14 23:33:33 | DEBUG | jgclark.Filer v1.1.5 :: moveParas: move current para only
2024-03-14 23:33:33 | DEBUG | jgclark.Filer v1.1.5 :: -> bottom of note, line 9
2024-03-14 23:33:33 | DEBUG | jgclark.Filer v1.1.5 :: - Removing 1 paras from original origNote (which had 33 paras)
Executing function 'moveParasToTomorrow'
2024-03-14 23:33:43 | DEBUG | jgclark.Filer v1.1.5 :: moveParas: move current para only
2024-03-14 23:33:43 | DEBUG | jgclark.Filer v1.1.5 :: -> bottom of note, line 10
2024-03-14 23:33:43 | DEBUG | jgclark.Filer v1.1.5 :: - Removing 1 paras from original origNote (which had 32 paras)
2024-03-14 23:33:43 🥺 WARN🥺 jgclark.Filer v1.1.5 :: - WARNING: After delete there are 32 paragraphs
Executing function 'moveParasToTomorrow'
2024-03-14 23:35:07 | DEBUG | jgclark.Filer v1.1.5 :: moveParas: move current para only
2024-03-14 23:35:07 | DEBUG | jgclark.Filer v1.1.5 :: -> bottom of note, line 10
2024-03-14 23:35:07 | DEBUG | jgclark.Filer v1.1.5 :: - Removing 1 paras from original origNote (which had 32 paras)
Note that I have deliberately left good time between calls to mean it shouldn't be a caching issue.
Additional context
This has been happening a few times a week for me for at least a year.
@EduardMe is there anything more I can do to help you figure out what's causing this?
- Lingua principale
- JavaScript
- Stelle
- 204
- Fork
- 82
- Merge medio
- 22h 27m
- PR unite (30g)
- 3
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di NotePlan/plugins
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
Dashboard: Task "Comment" Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
-
Tidy: Issue with plugin.json Apertabug
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 38/100
Tutte le issue di NotePlan/plugins
Issue simili
-
code-quality refactoring
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
langchain-ai/deepagents#6450 ·
-
optimization optimization:agents-md-curator
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
githubnext/gh-aw-cao#13143 ·
-
status: needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100