Skip to content

gortex context hardcodes Go code fences for non-Go source #121

@jpambrun

Description

@jpambrun

Describe the bug
gortex context / export_context renders embedded source snippets with a hardcoded go Markdown fence, even when the indexed symbol is from another language such as TypeScript. The source content and file path are correct, but syntax highlighting is wrong.

To Reproduce

  1. Run Gortex on a repo containing TypeScript code.
  2. Query context for a task that returns a TypeScript symbol, for example:
      cd /home/jpambrun/work/newvue
      gortex context -t "token invalidation"
  3. Observe that a .ts symbol is rendered inside a ```go code fence.

Expected behavior
Code fences should match the source language, e.g. TypeScript files should render as:

  ``ts
  // TypeScript source
  ``

Actual behavior:
TypeScript source is rendered as:

  ``go
  // TypeScript source
  ``

Environment:

gortex v0.48.0+1c29216c
  commit:  1c29216c
  built:   2026-06-18T15:32:57Z
  go:      go1.26.4
  os/arch: linux/amd64

Additional context
Any other context, logs, or screenshots.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions