anomalyco / anomalyco/opencode

Core HTML conversion loses inline-code boundary backticks

Open Beginner friendly
#47,409 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

Converting HTML inline code can lose literal backticks at the start or end of its contents. The generated delimiters join the content's backticks.

Plugins

Built-in webfetch converter; no external plugins.

OpenCode version

V2 source checkout at 541937d12449e64d078c67e9013f1c288004b83f.

Steps to reproduce
WebFetchTool.convertHTMLToMarkdown("<p>Use <code>&#96;x&#96;</code>.</p>")
// Actual:   "Use ```x```."
// Expected: "Use `` `x` ``."

The actual Markdown renders code containing only x, losing both literal backticks. Leading-only and trailing-only backticks can also prevent the code span from parsing. Internal backticks do not trigger the same failure.

Operating System

macOS arm64, Bun 1.4.1.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at WebFetchTool.convertHTMLToMarkdown in the built-in webfetch converter and reproduce the TypeScript example from the issue. Verify that leading and trailing literal backticks are preserved, including the shown output and one-sided cases; done when the generated Markdown renders the complete code content while internal backticks still work.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.