mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-05 20:27:52 +08:00
docs: fix path regex (#11650)
This commit is contained in:
@@ -19,11 +19,11 @@
|
||||
<p class="path">
|
||||
路由: <code>{{ path }}</code>
|
||||
</p>
|
||||
<div v-if="path.match(/:.*?(\/|$)/g)">
|
||||
<div v-if="path.match(/(?<=:).*?(?=\/|$)/g)">
|
||||
<p>
|
||||
参数:
|
||||
</p>
|
||||
<ul><li class="params" v-for="(item, index) in path.match(/:.*?(\/|$)/g)"><code>{{item.replace(/:|\?|\+|\*|\//g,'')}}</code>, {{{'?':'可选','*':'零个或多个','+':'单个或多个'}[item[item.length-1]]||'必选'}} - <span v-html="renderMarkdown(paramsDesc[index])"></span></li></ul>
|
||||
<ul><li class="params" v-for="(item, index) in path.match(/(?<=:).*?(?=\/|$)/g)"><code>{{item.replace(/:|\?|\+|\*/g,'')}}</code>, {{{'?':'可选','*':'零个或多个','+':'单个或多个'}[item[item.length-1]]||'必选'}} - <span v-html="renderMarkdown(paramsDesc[index])"></span></li></ul>
|
||||
</div>
|
||||
<div v-else><p>参数: 无</p></div>
|
||||
<slot></slot>
|
||||
|
||||
Reference in New Issue
Block a user