mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-29 01:52:04 +00:00
Merged via /review-pr -> /prepare-pr -> /merge-pr.
Prepared head SHA: 4a967c51f5
Co-authored-by: lailoo <20536249+lailoo@users.noreply.github.com>
Co-authored-by: sebslight <19554889+sebslight@users.noreply.github.com>
Reviewed-by: @sebslight
This commit is contained in:
@@ -24,7 +24,14 @@ type MarkdownToken = {
|
||||
attrGet?: (name: string) => string | null;
|
||||
};
|
||||
|
||||
export type MarkdownStyle = "bold" | "italic" | "strikethrough" | "code" | "code_block" | "spoiler";
|
||||
export type MarkdownStyle =
|
||||
| "bold"
|
||||
| "italic"
|
||||
| "strikethrough"
|
||||
| "code"
|
||||
| "code_block"
|
||||
| "spoiler"
|
||||
| "blockquote";
|
||||
|
||||
export type MarkdownStyleSpan = {
|
||||
start: number;
|
||||
@@ -578,8 +585,10 @@ function renderTokens(tokens: MarkdownToken[], state: RenderState): void {
|
||||
if (state.blockquotePrefix) {
|
||||
state.text += state.blockquotePrefix;
|
||||
}
|
||||
openStyle(state, "blockquote");
|
||||
break;
|
||||
case "blockquote_close":
|
||||
closeStyle(state, "blockquote");
|
||||
state.text += "\n";
|
||||
break;
|
||||
case "bullet_list_open":
|
||||
|
||||
@@ -21,6 +21,7 @@ export type RenderOptions = {
|
||||
};
|
||||
|
||||
const STYLE_ORDER: MarkdownStyle[] = [
|
||||
"blockquote",
|
||||
"code_block",
|
||||
"code",
|
||||
"bold",
|
||||
|
||||
Reference in New Issue
Block a user