vweevers / hallmark

Markdown Style Guide, with linter and automatic fixer.
GNU General Public License v3.0
30 stars 3 forks source link

Unable to use GitLab references without prefix #114

Open sleeyax opened 4 months ago

sleeyax commented 4 months ago

Not sure what I'm doing wrong but I have the following in package.json:

"hallmark": {
    "autolinkReferences": {
      "prefix": "#",
      "url": "https://gitlab.com/company/project/-/issues/<num>"
    }
  }

And added the following entry:

## [0.0.1] - 2024-02-05

### Changed

### Added

- Add feature (#1)

### Removed

### Fixed

Then hallmark fix generates the following:

## [0.0.1] - 2024-02-05

### Changed

### Added

- Add feature ([#1](https://github.com/company/project/issues/1))

### Removed

### Fixed

As you can see, the link should be to gitlab.com but it's generating a link pointing to github.com instead.

vweevers commented 4 months ago

That plugin relies on prefixes like JIRA-123, GH-123, GL-123, rather than a hash. The #123 syntax is reserved for GitHub atm and handled by a different plugin (which causes the above output).

sleeyax commented 4 months ago

Oh that's too bad. Is it possible at all to configure # to apply gitlab instead? I don't use GitHub for this project.

vweevers commented 4 months ago

Not currently. I see that remark-github has a buildUrl option that we can maybe use to override the github.com domain. We'd also need an option on this end (or maybe detect the use of GitLab by repository info in package.json).