Updating notes does not update all lines
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- typescript
Research direction
Start by reproducing the issue with the hackmd-cli notes create, hackmd-cli notes update, and hackmd-cli export commands using the content pairs in this report. Compare the exported note after one and two updates, and determine whether the CLI can address the inconsistent HackMD API response; done means the final line is updated reliably.
Written by the indexing model from the issue text.
Description
First of all, thanks for maintaining this tool.
Sometimes, when using the notes update command, the note is not fully updated. Here is a fairly small example/reproduction:
$ hackmd-cli notes create --content='
aa
```
aab
```
aab'
ID Title User path Team path
────────────────────── ──────── ───────── ─────────
59bbDYGPSESuaJuBh_fD4A Untitled gitmd
to create a note with some content. Now, update it with some other content:
$ hackmd-cli notes update --noteId 59bbDYGPSESuaJuBh_fD4A --content='
aa
```json
aabc
```
aabc'
However, the last modification (the last line) is not taken into account:
$ hackmd-cli export --noteId 59bbDYGPSESuaJuBh_fD4A
aa
```json
aabc
```
aab
If I do the hackmd-cli notes update command again, the content of the note matches what is required.
However, I've seen some old content/new content pairs where hackmd-cli notes update does nothing...
This seems to be a hackmd API bug (rather than the CLI), as I tried to directly write the HTTP requests, and it fails. But I could not find any github repository where we can file issues on the API itself. Feel free to redirect me if I'm not opening the issue in the right repo!
(while writing the HTTP requests by hand, I've also seen a case where writing a newline at the end of the JSON payload would change the outcome of the "update" API request... if that helps to track the bug)
- Dominant language
- TypeScript
- Stars
- 176
- Forks
- 13
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 5
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from hackmdio/hackmd-cli
-
Config command Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
hackmdio/hackmd-cli#45 · 2 comments ·
-
login problem Open
Difficulty 3/5 1-2 days Newbie friendliness 45/100
hackmdio/hackmd-cli#108 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
hackmdio/hackmd-cli#105 · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
hackmdio/hackmd-cli#89 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
hackmdio/hackmd-cli#87 ·
All issues in hackmdio/hackmd-cli
Similar issues
-
Browser Waiting for: Product Owner
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
getsentry/sentry-javascript#24577 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
agilepathway/label-checker#640 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
agentic-workflows
Difficulty 1/5 Under an hour Newbie friendliness 85/100
githubnext/rig#534 ·
-
automation missing-model model-sync provider:pioneer
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
anomalyco/models.dev#7701 ·