aws-samples / aws-samples/bedrock-chat

[BUG] Extra escaping character '\' in code samples

Open
#941 3 comments 1 reaction 0 assignees View on GitHub
bug identified
Dominant language
TypeScript
Stars
1.3k
Forks
535
Avg merge
1d 12h
Merged PRs (30d)
10

Description

## 🐞Describe the bug

When the output is a code sample, we notice an extra escaping character "\\" before $. It makes it impossible to use the code copied from there without removing all the extra characters.

## 🔄 To Reproduce

Ask for code examples, e.g. PHP code.

## 📷 Screenshots

This is a sample of what we get with PHP code. Note the extra "\\" character before variable names:

Image

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with a PHP code-example request and compare the displayed sample with the copied code. Trace the code-sample rendering and escaping path; done means generated examples no longer contain extra backslashes before PHP variable names.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, typescript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.