hackmdio / hackmdio/hackmd-cli

Updating notes does not update all lines

オープン
#86 コメント 4 件 リアクション 1 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
176
フォーク
13
平均マージ
1日 4時間
マージ済み PR(30日)
5

説明

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:

````sh
$ 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)

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。