Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The prompt was:

> Give me a Python function that takes a string holding text in Markdown markup syntax and that uses regular expressions to replace any Markdown markup codes for bold, italics and underline with their ANSI equivalent.

BTW, your solution will produce bad output. Markdown's "bold" etc markup comes in pairs of markers and your simple replacement will match singlets.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: