diff --git a/CHANGELOG.md b/CHANGELOG.md index 873b55e..0efccde 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ All notable changes to the "claude-code-chat" extension will be documented in th Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file. +## [0.1.2] - 2025-06-20 + +### 🐛 Bug Fixes +- Fixed markdown parsing bug where underscores in code identifiers (like "protein_id") were incorrectly converted to italic formatting +- Updated regex pattern to only apply italic formatting when underscores are surrounded by whitespace or at string boundaries +- Preserved proper formatting for code snippets and technical identifiers +- Always show New Chat button + ## [0.1.0] - 2025-06-20 ### 🚀 Major Features Added diff --git a/package.json b/package.json index 4b9132b..4e497ce 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "claude-code-chat", "displayName": "Claude Code Chat", "description": "Beautiful Claude Code Chat Interface for VS Code", - "version": "0.1.1", + "version": "0.1.2", "publisher": "AndrePimenta", "author": "Andre Pimenta", "repository": { diff --git a/src/ui.ts b/src/ui.ts index 5cdf53b..a14fb4b 100644 --- a/src/ui.ts +++ b/src/ui.ts @@ -1516,9 +1516,9 @@ const html = ` // Bold line = line.replace(/\\*\\*(.*?)\\*\\*/g, '$1'); - // Italic + // Italic - only apply when underscores are surrounded by whitespace or at beginning/end line = line.replace(/(?$1'); - line = line.replace(/_(.*?)_/g, '$1'); + line = line.replace(/(^|\\s)_([^_\\s][^_]*[^_\\s]|[^_\\s])_(?=\\s|$)/g, '$1$2'); // Headers if (/^####\\s+/.test(line)) {