mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-24 03:58:53 +00:00
fix param description
This commit is contained in:
parent
f497d7b212
commit
f02a41b675
@ -2,6 +2,11 @@ import { createRoot } from 'react-dom/client';
|
|||||||
import jsdoc from '../../../../doc.json';
|
import jsdoc from '../../../../doc.json';
|
||||||
|
|
||||||
const getDocLabel = (doc) => doc.name || doc.longname;
|
const getDocLabel = (doc) => doc.name || doc.longname;
|
||||||
|
const getInnerText = (html) => {
|
||||||
|
var div = document.createElement('div');
|
||||||
|
div.innerHTML = html;
|
||||||
|
return div.textContent || div.innerText || '';
|
||||||
|
};
|
||||||
|
|
||||||
export function Autocomplete({ doc }) {
|
export function Autocomplete({ doc }) {
|
||||||
return (
|
return (
|
||||||
@ -11,7 +16,7 @@ export function Autocomplete({ doc }) {
|
|||||||
<ul>
|
<ul>
|
||||||
{doc.params?.map(({ name, type, description }, i) => (
|
{doc.params?.map(({ name, type, description }, i) => (
|
||||||
<li key={i}>
|
<li key={i}>
|
||||||
{name} : {type.names?.join(' | ')} {description ? <> - {description}</> : ''}
|
{name} : {type.names?.join(' | ')} {description ? <> - {getInnerText(description)}</> : ''}
|
||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user