Skip to content

Commit e7a3b6a

Browse files
justin808claude
andcommitted
Improve markdown-to-terminal conversion to preserve URLs
- Update convert_markdown_to_terminal to preserve URLs in links - Changed link conversion from "[text](url)" to "text: url" format - Headers (H1-H6) now properly converted with emoji prefix - Removed redundant Professional Support cleanup - Add documentation comment to README.md explaining marker usage This ensures users can access actual URLs in error messages, making support resources more accessible. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 8e1875d commit e7a3b6a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ _Requires creating a free account._
141141
- A JavaScript package manager (npm, yarn, pnpm, or bun)
142142

143143
<!-- TROUBLESHOOTING_LINKS_START -->
144+
<!-- NOTE: Content between TROUBLESHOOTING_LINKS markers is dynamically extracted and displayed in error messages -->
144145
# 🆘 Get Help & Support
145146

146147
**Need immediate help?** Here are your options, ordered by response time:

lib/react_on_rails/utils.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -308,11 +308,10 @@ def self.extract_troubleshooting_section
308308

309309
private_class_method def self.convert_markdown_to_terminal(markdown_text)
310310
markdown_text
311-
.gsub(/^#\s+(.+)$/, "\n📞 \\1") # Convert # headers
312-
.gsub(/\*\*(.+?)\*\*/, "\\1") # Remove bold markdown
313-
.gsub(/\[([^\]]+)\]\([^)]+\)/, "\\1") # Convert links to just text
314-
.gsub(/^-\s+/, " • ") # Convert bullets
315-
.gsub(/🚀\s+\*\*Professional Support\*\*/, "🚀 Professional Support") # Clean up specific formatting
311+
.gsub(/^#+\s+(.+)$/, "\n📞 \\1") # Convert H1-H6 headers
312+
.gsub(/\*\*(.+?)\*\*/, "\\1") # Remove bold markdown
313+
.gsub(/\[([^\]]+)\]\(([^)]+)\)/, "\\1: \\2") # Convert links to "text: url"
314+
.gsub(/^-\s+/, " • ") # Convert bullets
316315
end
317316

318317
private_class_method def self.default_troubleshooting_section

0 commit comments

Comments
 (0)