Tencent / Tencent/cherry-markdown
[Bug report] List 预览编辑使部分语法失效、结束时将屏幕切回原位
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 4.9k
- Forks
- 572
- Avg merge
- 17h 5m
- Merged PRs (30d)
- 14
Description
Describe the bug
语法失效
预览编辑带有 斜体 下划线 {target=_blank} 等部分语法的list项,编辑后这些语法消失
https://github.com/Tencent/cherry-markdown/assets/74123674/42e81931-936d-419e-8a39-1f00891f3e91
原因是cherry.engine.makeMarkdown并不能从html中还原出这些语法,在markdown->html过程中丢掉了
直接点击编辑再点别处不能触发,因为现在有未编辑时直接结束而不进行markdown->html->markdown这个过程
结束时切屏
list预览编辑过程中,用滚轮将移到其他位置,然后点击previewer,屏幕位置会被拉回被编辑中的list附近,影响不大,但觉得很怪异
https://github.com/Tencent/cherry-markdown/assets/74123674/3a9f6c0e-37c6-42f7-ba4a-ad3f5d404b32
Reproduction
dev版本,按上面视频做
System Info
System:
OS: Windows 10 10.0.19045
CPU: (12) x64 Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
Memory: 5.90 GB / 15.78 GB
Binaries:
Node: 18.15.0 - C:\Program Files\nodejs\node.EXE
Yarn: 3.6.3 - C:\Program Files\nodejs\yarn.CMD
npm: 9.5.0 - C:\Program Files\nodejs\npm.CMD
pnpm: 8.8.0 - C:\Program Files\nodejs\pnpm.CMD
Browsers:
Edge: Spartan (44.19041.1266.0), Chromium (117.0.2045.60)
Internet Explorer: 11.0.19041.1566
Validations
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
- The provided reproduction is a minimal reproducible of the bug.
Help us
None
Contributor guide
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.
Research direction
Start by reproducing the two behaviors in the dev version: edit a list item in the preview and then scroll away before clicking the previewer. Inspect the named cherry.engine.makeMarkdown conversion path and the preview editing flow; done means list syntax such as italics, underline, and {target=_blank} survives editing and the viewport does not jump unexpectedly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, markdown
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100