micro-editor / micro-editor/micro

bash heredoc ending sign bug

Open
#4,114 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug syntax
Dominant language
Go
Stars
29.6k
Forks
1.4k
Avg merge
2d 18h
Merged PRs (30d)
10

Description

Description

Highlighting in Bash heredoc gets terminated when there's a word inside the heredoc that has no space before it and has no words after it.

Bellow is the example:

#!/usr/bin/bash

cat <<HELLO

# Bellow does not work
DoesNotWork
	
HELLO

cat <<HELLO

This one works since there are more words.

HELLO
Environment
  • Version: 2.0.15
  • OS: Ubuntu 26.04
  • Terminal: ptyxis 50.1

Contributor guide

No contributing guide indexed for this repository

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

Reproduce the issue in micro with the Bash heredoc example from the report, then locate the Bash syntax-highlighting entry point and inspect how heredoc terminators are detected. Done means the first heredoc remains highlighted correctly when its body ends with a word lacking surrounding spaces, without breaking the working example.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, go
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.