最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

mkdocs - How to escape excessive brackets and pipes {|([^])} in Markdown? - Stack Overflow

programmeradmin1浏览0评论

I have been attempting to display this bit of text below on my page, using mkdocs, but due to the combined use of brackets and pipes, my page will not display the full text string here:

  • { "\\|([^]*)\\|" : "//someType" }

I have tried the following three iterations, to no avail:

I've added a \ before the ^ and after the ]

  • action: { "\\|([\^]\*)\\|" : "//someType" }
  • output: { \

I've tried adding an extra \ before and after each |

  • action: { "\\\|\([^]*)\\\|\" : "//someType" }
  • output: { "\|([^]*)\|" : "//someType" }

And I've tried adding two \\ before and after each |

  • action: { "\\\\|\\([^]*)\\\|\\" : "//someType" }
  • output: { \\

I have been attempting to display this bit of text below on my page, using mkdocs, but due to the combined use of brackets and pipes, my page will not display the full text string here:

  • { "\\|([^]*)\\|" : "//someType" }

I have tried the following three iterations, to no avail:

I've added a \ before the ^ and after the ]

  • action: { "\\|([\^]\*)\\|" : "//someType" }
  • output: { \

I've tried adding an extra \ before and after each |

  • action: { "\\\|\([^]*)\\\|\" : "//someType" }
  • output: { "\|([^]*)\|" : "//someType" }

And I've tried adding two \\ before and after each |

  • action: { "\\\\|\\([^]*)\\\|\\" : "//someType" }
  • output: { \\
Share asked Mar 3 at 21:07 JokersParadoxJokersParadox 11 bronze badge 2
  • { "\\\\|([^])\\\\|" : "//sometype" } is working for me – zerocukor287 Commented Mar 11 at 10:15
  • Thank you. Strange that it did not work for me. I eventually found a combination that worked: { "&92;\\\|\(\[^\]*)&92;\\\|\" : "//someType" } – JokersParadox Commented Mar 12 at 11:39
Add a comment  | 

1 Answer 1

Reset to default 0

Found my answer, after introducing some HTML to it:

{ "&92;\\\|\(\[^\]*)&92;\\\|\" : "//someType" }

发布评论

评论列表(0)

  1. 暂无评论