Skip to content

Commit

Permalink
fix: loosen up issue number regex
Browse files Browse the repository at this point in the history
This is a follow up for #55.

Asserting the start of the line gets in the way of matching issue ids in
the issue buffer, which uses a border right next to the issue number.

For example, the following comment in `GHOpenIssue 55`:

```
│#53
```
  • Loading branch information
davidmh authored and ldelossa committed Jul 28, 2022
1 parent bafa232 commit 00a8e46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/litee/gh/issues/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ local M = {}

local function extract_issue_under_cursor()
local current_word = vim.fn.expand('<cWORD>')
local issue_number = current_word:match('^#[0-9]+')
local issue_number = current_word:match('#[0-9]+')

if issue_number == nil then
return nil
Expand Down

0 comments on commit 00a8e46

Please sign in to comment.