removeParagraphs() API not always working
@EduardMe já está trabalhando nisso.
Desde 14/3/2024.
Avaliação
Esta issue ainda não foi avaliada.
Descrição
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?
- Linguagem predominante
- JavaScript
- Estrelas
- 204
- Forks
- 82
- Merge médio
- 22h 27min
- PRs com merge (30d)
- 3
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de NotePlan/plugins
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
-
bug
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
-
Dashboard: Task "Comment" Aberta
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
-
Tidy: Issue with plugin.json Abertabug
-
bug
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 38/100
Todas as issues de NotePlan/plugins
Issues semelhantes
-
code-quality refactoring
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
langchain-ai/deepagents#6450 ·
-
optimization optimization:agents-md-curator
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 86/100
githubnext/gh-aw-cao#13143 ·
-
status: needs triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100