charmbracelet / huh

Build terminal forms and prompts 🤷🏻‍♀️
MIT License
3.72k stars 94 forks source link

bug: note.render should escape everything in code block #288

Open c4po opened 2 weeks ago

c4po commented 2 weeks ago

Describe the bug

I need to render a text containing code in the note description. However, the characters _ and * are still being treated as control signals instead of as part of the code text.

To Reproduce

huh.NewGroup(
huh.NewNote().
Title("Please verify the code here").
Description("code start here:"+
"`error_message: something with *`")
)

Expected behavior

it should have

code start here:
error_message: something with *

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):