4

Example: https://example.com/repo/__tests__/asdf.js

https://example.com/repo/tests/asdf.js

The underscores in the URL should be preserved, but are instead used to bold part of the URL. This can be a little confusing to someone who is reading a post and correcting a URL elsewhere, or copying only part of a URL, instead of right-clicking to "copy link location".

There are workarounds:

  • Wrap raw URLs in `backticks`
  • Notice the formatting and use the edit link to find the correct URL
  • Copy the entire link src, instead of copying the rendered URL

Discovered on Unit testing route matching with React Router 2

2
  • In that case, they could have just made the text "in our test for matchRoutes" a link without showing the bare URL. I find the cases where I need a bare URL are few and far between. But I agree it shouldn't format the URLs. Oct 3, 2016 at 15:44
  • 1
    "Wrap raw URLs in backticks" no freaking no, just use the less,more than symbols example.com/repo/__tests__/asdf.js
    – Braiam
    Oct 3, 2016 at 15:54

0

You must log in to answer this question.

Browse other questions tagged .