mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-05 04:11:26 +08:00
docs: support parameter suffix * (#7946)
* docs: support parameter suffix `*` `*` denotes a zero or more parameter matches, so the parameter including `*` is optional. (https://github.com/pillarjs/path-to-regexp#zero-or-more) * docs: mention the parameter suffix `*` * docs: support parameter suffix `+` * docs: add document of parameter suffixs * docs: fix having / at the end of parameter * docs: add missing changes in en docs * docs: typo Co-authored-by: TonyRL <TonyRL@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
2441ef91f0
commit
eb79456f40
@@ -16,7 +16,7 @@
|
||||
<p>
|
||||
Parameters:
|
||||
</p>
|
||||
<ul><li class="params" v-for="(item, index) in path.match(/(?<=:).*?(?=\/|$)/g)"><code>{{item.replace('?','')}}</code>, {{(item.includes('?'))?'optional':'required'}} - <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>, {{{'?':'optional','*':'zero or more','+':'one or more'}[item[item.length-1]]||'required'}} - <span v-html="renderMarkdown(paramsDesc[index])"></span></li></ul>
|
||||
</div>
|
||||
<div v-else><p>Parameters: N/A</p></div>
|
||||
<slot></slot>
|
||||
|
||||
Reference in New Issue
Block a user