acme: regex not mathing as much as possible

Open
#108 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
go
Domain
desktop

Research direction

The report names no source file or test. Reproduce the Edit command against the supplied two-line text, then trace the acme implementation of the x address and compare its behavior with go sam and plan9port acme. Done means the command produces “Tabc Txyz” rather than per-character substitutions.

Written by the indexing model from the issue text.

Description

Considering the following text:

abc xyz

The following Edit command:

Edit ,x/[a-z]+/ s/.*/T&/g

Should result in

Tabc Txyz

But it seems like x is capturing single chars only, instead the full 3 char group, so the command results in :

TaTbTc TxTyTz

I tried to find the problem to fix it myself but could not find where the bug is. It seems to work fine in go sam and plan9port acme.

Dominant language
Go
Stars
377
Forks
109
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from 9fans/go

All issues in 9fans/go

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.