GitHub Repository
+{_html_text(info.full_name or info.repo_id)}
+{_html_text(description)}
+GitHub Repository
+{_html_text(description)}
+{_html_text(text)}"
+
+
+def _markdown_to_html(markdown_text: str) -> str:
+ return str(markdown.markdown(markdown_text, extensions=_MARKDOWN_EXTENSIONS))
+
+
+def _build_meta_item(label: str, value: str, *, code: bool = False) -> str:
+ value_html = _html_code(value) if code else _html_text(value)
+ return (
+ '"
+ )
+
+
+def _format_subcommands_html(meta: CommandMeta) -> str:
+ if not meta.subcommands:
+ return ""
+ rows: list[str] = []
+ for subcmd in meta.subcommands.values():
+ args_str = f" {subcmd.args}" if subcmd.args else ""
+ perm_mark = ""
+ if subcmd.permission != meta.permission:
+ perm_mark = (
+ f'{_permission_label(subcmd.permission)}'
+ )
+ rows.append(
+ "Undefined 命令帮助
+当前会话可见的斜杠命令速查表
+{_html_text(hint_text)}
' + "Undefined 命令帮助
+{_html_text(description)}
+