@alexnodeland/claude-telegram 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/html.ts +14 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexnodeland/claude-telegram",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "Claude Code Channel plugin + standalone orchestrator bridging Telegram to Claude Code sessions",
5
5
  "module": "src/index.ts",
6
6
  "main": "src/index.ts",
package/src/html.ts CHANGED
@@ -98,9 +98,23 @@ function convertInlineFormatting(text: string): string {
98
98
  // Links: [text](url)
99
99
  s = s.replace(/\[([^\]]+)\]\(([^)]+)\)/g, '<a href="$2">$1</a>');
100
100
 
101
+ // Numbered lists: leading "1. " → keep number with period
102
+ s = s.replace(/^[\t ]*(\d+)\.\s+/gm, "$1. ");
103
+
101
104
  // Bullet lists: leading "- " or "* " → "• "
102
105
  s = s.replace(/^[\t ]*[-*]\s+/gm, "• ");
103
106
 
107
+ // Blockquotes: leading "> " → <blockquote>
108
+ // Collect consecutive quoted lines into a single blockquote
109
+ s = s.replace(/(?:^&gt; (.+)$(?:\n|$))+/gm, (match) => {
110
+ const inner = match
111
+ .split("\n")
112
+ .map((line) => line.replace(/^&gt; /, ""))
113
+ .filter((line) => line !== "")
114
+ .join("\n");
115
+ return `<blockquote>${inner}</blockquote>\n`;
116
+ });
117
+
104
118
  return s;
105
119
  })
106
120
  .join("");