fix(telegram): narrow rich table alignment surface · openclaw/openclaw@f1e38f2
obviyus
·
2026-06-24
·
via Recent Commits to openclaw:main
File tree
packages/markdown-core/src
| Original file line number | Diff line number | Diff line change |
|---|
@@ -8,7 +8,6 @@ import {
|
8 | 8 | markdownToIRWithMeta, |
9 | 9 | type MarkdownLinkSpan, |
10 | 10 | type MarkdownIR, |
11 | | -type MarkdownTableAlignment, |
12 | 11 | type MarkdownTableCell, |
13 | 12 | type MarkdownTableMeta, |
14 | 13 | renderMarkdownIRChunksWithinLimit, |
@@ -347,6 +346,8 @@ type TelegramHtmlTagSupport = {
|
347 | 346 | attrPatterns: ReadonlyMap<string, RegExp>; |
348 | 347 | }; |
349 | 348 | |
| 349 | +type TelegramTableAlignment = NonNullable<MarkdownTableMeta["aligns"]>[number]; |
| 350 | + |
350 | 351 | const TELEGRAM_LEGACY_HTML_TAG_SUPPORT: TelegramHtmlTagSupport = { |
351 | 352 | simpleTags: TELEGRAM_SIMPLE_HTML_TAGS, |
352 | 353 | attrPatterns: TELEGRAM_ATTR_HTML_TAG_PATTERNS, |
@@ -976,7 +977,7 @@ function renderTelegramRichHtmlTable(table: MarkdownTableMeta): string {
|
976 | 977 | const renderCell = ( |
977 | 978 | tag: "td" | "th", |
978 | 979 | value: MarkdownTableCell | undefined, |
979 | | -align: MarkdownTableAlignment | undefined, |
| 980 | +align: TelegramTableAlignment | undefined, |
980 | 981 | ) => { |
981 | 982 | const alignAttr = align ? ` align="${align}"` : ""; |
982 | 983 | return `<${tag}${alignAttr}>${renderCellValue(value)}</${tag}>`; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -78,7 +78,7 @@ function createStyleSpan(params: MarkdownStyleSpan): MarkdownStyleSpan {
|
78 | 78 | return span; |
79 | 79 | } |
80 | 80 | |
81 | | -export type MarkdownTableAlignment = "left" | "center" | "right"; |
| 81 | +type MarkdownTableAlignment = "left" | "center" | "right"; |
82 | 82 | |
83 | 83 | export type MarkdownTableData = { |
84 | 84 | headers: string[]; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -131,7 +131,7 @@ const defaultPublicDeprecatedExportsByEntrypointBudget = Object.freeze({
|
131 | 131 | "ssrf-policy": 1, |
132 | 132 | "ssrf-runtime": 1, |
133 | 133 | "media-runtime": 2, |
134 | | -"text-runtime": 190, |
| 134 | +"text-runtime": 189, |
135 | 135 | "agent-runtime": 7, |
136 | 136 | "plugin-runtime": 13, |
137 | 137 | "channel-secret-runtime": 23, |
@@ -202,11 +202,11 @@ let publicDeprecatedExportsByEntrypointBudget;
|
202 | 202 | try { |
203 | 203 | budgets = { |
204 | 204 | publicEntrypoints: readBudgetEnv("OPENCLAW_PLUGIN_SDK_MAX_PUBLIC_ENTRYPOINTS", 322), |
205 | | -publicExports: readBudgetEnv("OPENCLAW_PLUGIN_SDK_MAX_PUBLIC_EXPORTS", 10383), |
| 205 | +publicExports: readBudgetEnv("OPENCLAW_PLUGIN_SDK_MAX_PUBLIC_EXPORTS", 10381), |
206 | 206 | publicFunctionExports: readBudgetEnv("OPENCLAW_PLUGIN_SDK_MAX_PUBLIC_FUNCTION_EXPORTS", 5210), |
207 | 207 | publicDeprecatedExports: readBudgetEnv( |
208 | 208 | "OPENCLAW_PLUGIN_SDK_MAX_PUBLIC_DEPRECATED_EXPORTS", |
209 | | -3248, |
| 209 | +3247, |
210 | 210 | ), |
211 | 211 | publicWildcardReexports: readBudgetEnv( |
212 | 212 | "OPENCLAW_PLUGIN_SDK_MAX_PUBLIC_WILDCARD_REEXPORTS", |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -25,7 +25,6 @@ export {
|
25 | 25 | type MarkdownParseOptions, |
26 | 26 | type MarkdownStyle, |
27 | 27 | type MarkdownStyleSpan, |
28 | | -type MarkdownTableAlignment, |
29 | 28 | type MarkdownTableCell, |
30 | 29 | type MarkdownTableMeta, |
31 | 30 | } from "../../packages/markdown-core/src/ir.js"; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。