removeParagraphs() API not always working
@EduardMe arbeitet bereits daran.
Seit 14.3.2024.
Bewertung
Dieses Issue wurde noch nicht bewertet.
Beschreibung
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?
- Vorherrschende Sprache
- JavaScript
- Sterne
- 204
- Forks
- 82
- Ø Merge
- 22 Std. 27 Min.
- Gemergte PRs (30 T.)
- 3
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus NotePlan/plugins
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
-
bug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
-
bug
-
bug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 38/100
Alle Issues in NotePlan/plugins
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
mksglu/context-mode#1200 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
neondatabase/website#5944 ·
-
module: core
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
bigbluebutton/bigbluebutton#25849 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
jaegertracing/jaeger-ui#4506 ·