instant-markdown-d icon indicating copy to clipboard operation
instant-markdown-d copied to clipboard

The plug can't produce id for title

Open wuxinyiwu opened this issue 4 years ago • 7 comments

Problem summary

The plug can't produce id for title

Expected

Environment Information

  • OS:windows7
  • Vim / Neovim version:vim8.1.24
  • Browser:firefox

Steps to reproduce the issue (required)

Start with command you used to install instant-markdown-d. Use a minimal.vimrc to reproduce the issue and open your markdown file as:

vim -u minimal.vimrc my_markdown_file.md

Provide the debug output (required)

Run cat my_markdown_file.md | instant-markdown-d --mathjax --debug. It generates a debug.html file - attach it here. Also, paste the console output here:


Screen shot (if possible)

1630074819(1)

wuxinyiwu avatar Aug 27 '21 14:08 wuxinyiwu

I don't know much about vim and plug,please get back to me quickly,Let me know whether the plug does not have this function or there is a bug

wuxinyiwu avatar Aug 27 '21 14:08 wuxinyiwu

@wuxinyiwu Can you share the markdown source you were trying to render?

ashwinvis avatar Sep 19 '21 08:09 ashwinvis

@ashwinvis this is my markdown source,i am not sure your plugin can create id,or i have a bug

<!-- vim-markdown-toc GFM -->

* [测试网额你的44444444](#测试网额你的44444444)
  * [真的是这样吗](#真的是这样吗)
* [7777d](#7777d)
* [真的吗](#真的吗)
* [哈哈哈哈](#哈哈哈哈)
  * [dddddddddddd](#dddddddddddd)
      * [三级标题](#三级标题)
          * [四级标题](#四级标题)
* [gggg](#gggg)

<!-- vim-markdown-toc -->
<!-- vim-markdown-toc -->
# 测试网额你的44444444 

dsds
## 真的是这样吗
444444
# 7777d

  我的错误,让你手上了444


# 真的吗


# 哈哈哈哈
## dddddddddddd
### 三级标题
#### 四级标题
# gggg

wuxinyiwu avatar Sep 19 '21 08:09 wuxinyiwu

@wuxinyiwu The plugin uses instant-markdown-d which relies on Markdown-it to render markdown. See https://markdown-it.github.io/ where I don't see any id= tags rendered. You may also check https://markdown-it.github.io/markdown-it/ for docs. If it is supported, pull-request are welcome at instant-markdown-d repo.

ashwinvis avatar Sep 19 '21 11:09 ashwinvis

Thank you for your reply,i known the plugin can not create id for title,if i have time,i may be try complete the function,because if i have toc,i need id to jump,unfortunately the plugin did not realize this function。

wuxinyiwu avatar Sep 19 '21 15:09 wuxinyiwu

I see. See also:

  • https://www.npmjs.com/package/markdown-it-table-of-contents/
  • https://www.npmjs.com/package/markdown-it-anchor

ashwinvis avatar Sep 19 '21 16:09 ashwinvis

Somebody added support for this in #103

ashwinvis avatar Feb 07 '24 21:02 ashwinvis