sindresorhus/refined-github

Triple back-ticks incorrectly rendered in commits' body #3990

MrChocolatine posted onGitHub

<!-- Thanks for reporting a bug! â›° 1. Make sure the bug is caused by Refined GitHub. Try disabling the extension first. 2. Include a full URL where the bug appears. 3. Include a screenshot/gif Issues without a URL/screenshot will be closed -->

  1. The issue is cause by Refined GitHub, I tried with and without it.

  2. URLs where the bug appears

These URLs are for example and might not contain what it is needed for see the actual issue. But at least you see the format of URLs where the issue appears.

  • https://github.com/sindresorhus/refined-github/commit/71975fa0c18ee7eabee9f2b640d7aaa8a731859c
  • https://github.com/sindresorhus/refined-github/pull/3974/commits/66ec30d7428ccf42acf0bbe4bacae49c4106fd0f
  1. Screenshots

Screenshots for a private project

Without the extension

00 without

With the extension

01 with


It is not a big deal, and not a "real bug" to me (everything works perfectly and it is just a few backticks...) but it might have other consequences? 🤔

posted by MrChocolatine about 4 years ago

It’s indeed a bug, even though a minor one. Thanks for reporting.

I think an easy fix would be to change the regex to require text between backticks + exclude line breaks, so that probably means adding [^\n]+ somewhere in it.

Supporting the whole block (as a separate feature) would also be nice, but I think the commits body is the only place where this exists, plus it wouldn’t make any difference since the whole block is already mono-spaced. Also one would expect syntax highlighting. This is likely impossible in Refined GitHub because I don’t want to import a whole library.

posted by fregante about 4 years ago

Fund this Issue

$0.00
Funded

Pull requests