Skip to content

Commit

Permalink
fix: title for issues (#38)
Browse files Browse the repository at this point in the history
[#1: Example open
issue](#1)
[#2: Example closed
issue](#2)

and not

[#1](#1)
[#2](#2)
  • Loading branch information
AlexanderBrevig committed Mar 8, 2024
1 parent 3715108 commit f915926
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ This is a tool for getting link suggestions while writing READMEs and GitHub Wik

Use this LSP in conjunction with some other Markdown LSP if you want gotoDefinition et.al. This LSP only focuses on adding autocomplete to

* [x] `#` Issues and PRs
* [x] `[` Public Wiki Pages
* [x] `:` Organizations / Owners
* [x] `/` Repositories (yours and the orgs you are part of, no global search yet)
* [x] `@` Organization Members
- [x] `#` Issues and PRs
- [x] `[` Public Wiki Pages
- [x] `:` Organizations / Owners
- [x] `/` Repositories (yours and the orgs you are part of, no global search yet)
- [x] `@` Organization Members

[Issues](https://github.com/github-language-server/github-lsp/issues) and [PRs](https://github.com/github-language-server/github-lsp/pulls) are very welcome!

Expand Down Expand Up @@ -47,8 +47,8 @@ You can now configure your editor to use this LSP on `stdio`.

### `#` trigger

[#1](https://github.com/github-language-server/github-lsp/issues/1)
[#2](https://github.com/github-language-server/github-lsp/issues/2)
[#1: Example open issue](https://github.com/github-language-server/github-lsp/issues/1)
[#2: Example closed issue](https://github.com/github-language-server/github-lsp/issues/2)

### `@` trigger

Expand Down
3 changes: 2 additions & 1 deletion src/gh/issue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ impl GetLabel for Issue {
impl GetEdit for Issue {
fn get_edit(&self) -> String {
let id = self.number;
let title = &self.title;
let url = self
.url
.to_string()
.replace("api.", "")
.replace("repos/", "");
//TODO: cleanup & consider just printing the full URL and let GitHub format it
format!("[#{id}]({url})")
format!("[#{id}: {title}]({url})")
}
}
impl GetDetail for Issue {
Expand Down

0 comments on commit f915926

Please sign in to comment.