DocsGPT icon indicating copy to clipboard operation
DocsGPT copied to clipboard

🐛 Bug Report: Markdown parser's HTML cleanup deletes text between "<" and ">"

Open Anandb71 opened this issue 1 month ago • 1 comments

📜 Description

The cleanup re.sub(r"<.*?>", "", value) in the markdown parser removes anything between angle brackets, not only HTML tags.

I'd like to work on this. Plan: match only known HTML tag names and comments, with tests for x < 10 and y > 5, List and Map<K, V>.

👟 Reproduction steps

MarkdownParser().markdown_to_tups("# Compare\nIf x < 10 and y > 5 then use List.\n")

👍 Expected behavior

Comparisons and generics are kept, and only real HTML tags and comments are removed.

👎 Actual Behavior with Screenshots

It returns [('Compare', 'If x 5 then use List.\n\n')]

💻 Operating system

Linux

What browsers are you seeing the problem on?

No response

🤖 What development environment are you experiencing this bug on?

Docker

🔒 Did you set the correct environment variables in the right path? List the environment variable names (not values please!)

N/A

📃 Provide any additional context for the Bug.

No response

📖 Relevant log output


👀 Have you spent some time to check if this bug has been raised before?

  • [x] I checked and didn't find similar issue

🔗 Are you willing to submit PR?

Yes, I am willing to submit a PR!

🧑‍⚖️ Code of Conduct

  • [x] I agree to follow this project's Code of Conduct

Anandb71 avatar Oct 18 '26 18:10 Anandb71

@Anandb71, you're assigned to this issue.

  • Open a PR or post progress within 14 days; otherwise, the issue becomes available to others.
  • Read CONTRIBUTING.md before submitting.
  • Add regression tests for comparisons, generics, real HTML tags and comments in MarkdownParser.markdown_to_tups.
  • Include a screenshot or short recording of the before/after parser output in your PR.

Automated triage. A maintainer will follow up.

arc53-machine avatar Oct 18 '26 18:10 arc53-machine