mirror of
https://github.com/andrepimenta/claude-code-chat.git
synced 2025-12-09 10:59:53 +00:00
Fix italic formatting
This commit is contained in:
@@ -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.
|
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
|
## [0.1.0] - 2025-06-20
|
||||||
|
|
||||||
### 🚀 Major Features Added
|
### 🚀 Major Features Added
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "claude-code-chat",
|
"name": "claude-code-chat",
|
||||||
"displayName": "Claude Code Chat",
|
"displayName": "Claude Code Chat",
|
||||||
"description": "Beautiful Claude Code Chat Interface for VS Code",
|
"description": "Beautiful Claude Code Chat Interface for VS Code",
|
||||||
"version": "0.1.1",
|
"version": "0.1.2",
|
||||||
"publisher": "AndrePimenta",
|
"publisher": "AndrePimenta",
|
||||||
"author": "Andre Pimenta",
|
"author": "Andre Pimenta",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|||||||
@@ -1516,9 +1516,9 @@ const html = `<!DOCTYPE html>
|
|||||||
// Bold
|
// Bold
|
||||||
line = line.replace(/\\*\\*(.*?)\\*\\*/g, '<strong>$1</strong>');
|
line = line.replace(/\\*\\*(.*?)\\*\\*/g, '<strong>$1</strong>');
|
||||||
|
|
||||||
// Italic
|
// Italic - only apply when underscores are surrounded by whitespace or at beginning/end
|
||||||
line = line.replace(/(?<!\\*)\\*(?!\\*)(.*?)\\*(?!\\*)/g, '<em>$1</em>');
|
line = line.replace(/(?<!\\*)\\*(?!\\*)(.*?)\\*(?!\\*)/g, '<em>$1</em>');
|
||||||
line = line.replace(/_(.*?)_/g, '<em>$1</em>');
|
line = line.replace(/(^|\\s)_([^_\\s][^_]*[^_\\s]|[^_\\s])_(?=\\s|$)/g, '$1<em>$2</em>');
|
||||||
|
|
||||||
// Headers
|
// Headers
|
||||||
if (/^####\\s+/.test(line)) {
|
if (/^####\\s+/.test(line)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user