mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-08 05:59:00 +08:00
docs: invalid <p> for route params (#9455)
Signed-off-by: Rongrong <15956627+Rongronggg9@users.noreply.github.com>
This commit is contained in:
@@ -15,7 +15,8 @@
|
|||||||
<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(':','').replace('/','').replace('?','')}}</code>, {{(item.includes('?'))?'可选':'必选'}} - <span v-html="renderMarkdown(paramsDesc[index])"></span></li></ul> </p>
|
</p>
|
||||||
|
<ul><li class="params" v-for="(item, index) in path.match(/:.*?(\/|$)/g)"><code>{{item.replace(':','').replace('/','').replace('?','')}}</code>, {{(item.includes('?'))?'可选':'必选'}} - <span v-html="renderMarkdown(paramsDesc[index])"></span></li></ul>
|
||||||
</div>
|
</div>
|
||||||
<div v-else><p>参数: 无</p></div>
|
<div v-else><p>参数: 无</p></div>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
@@ -70,11 +71,11 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
renderMarkdown(item) {
|
renderMarkdown(item, inline = true) {
|
||||||
const md = require('markdown-it')({
|
const md = require('markdown-it')({
|
||||||
html: true,
|
html: true,
|
||||||
});
|
});
|
||||||
return md.render(item);
|
return inline ? md.renderInline(item) : md.render(item);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|||||||
@@ -15,7 +15,8 @@
|
|||||||
<div v-if="path.match(/(?<=:).*?(?=\/|$)/g)">
|
<div v-if="path.match(/(?<=:).*?(?=\/|$)/g)">
|
||||||
<p>
|
<p>
|
||||||
Parameters:
|
Parameters:
|
||||||
<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> </p>
|
</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>
|
||||||
</div>
|
</div>
|
||||||
<div v-else><p>Parameters: N/A</p></div>
|
<div v-else><p>Parameters: N/A</p></div>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
@@ -66,11 +67,11 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
renderMarkdown(item) {
|
renderMarkdown(item, inline = true) {
|
||||||
const md = require('markdown-it')({
|
const md = require('markdown-it')({
|
||||||
html: true,
|
html: true,
|
||||||
});
|
});
|
||||||
return md.render(item);
|
return inline ? md.renderInline(item) : md.render(item);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|||||||
Reference in New Issue
Block a user