danielmahon / gatsby-remark-relative-images

Convert markdown image src(s) to be relative for gatsby-remark-images.
https://www.npmjs.com/package/gatsby-remark-relative-images
BSD Zero Clause License
79 stars 29 forks source link

Transformation not working with special characters in path (like é) #27

Closed Arno500 closed 4 years ago

Arno500 commented 4 years ago

This path is correctly transformed: "image": "/uploads/jumbotron.jpg" -> "image": "../../uploads/jumbotron.jpg" This path is not: "image": "/uploads/macaron-animé.png" -> "image": "..\\uploads\\macaron-animé.png" When removing the accent in the filename, everything works.

From what I checked, the problem can be resolved by removing the outdated "slash" dependency and using gatsby-core-utils where the same function was fixed and is working as expected. https://github.com/gatsbyjs/gatsby/commit/9929cf06437873793333ece28be6ca41c3dffe4b#diff-039be84c08b1575fb3dbce971ae4089a PR here: https://github.com/gatsbyjs/gatsby/pull/14372

Env:

    OS: Windows 10 10.0.18363
    CPU: (16) x64 AMD Ryzen 7 3700X 8-Core Processor
  Binaries:
    Node: 13.0.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.21.1 - C:\Users\arnod\AppData\Roaming\npm\yarn.CMD
    npm: 6.13.4 - C:\Program Files\nodejs\npm.CMD
  Languages:
    Python: 3.8.0
  Browsers:
    Edge: 44.18362.449.0
  npmPackages:
    gatsby: 2.17.17 => 2.17.17
    gatsby-image: ^2.2.37 => 2.2.37
    gatsby-plugin-netlify: ^2.1.30 => 2.1.30
    gatsby-plugin-netlify-cms: ^4.1.33 => 4.1.33
    gatsby-plugin-purgecss: ^4.0.0 => 4.0.1
    gatsby-plugin-react-helmet: ^3.0.4 => 3.1.18
    gatsby-plugin-sass: ^2.0.7 => 2.1.26
    gatsby-plugin-sharp: ^2.3.10 => 2.3.10
    gatsby-remark-copy-linked-files: ^2.1.33 => 2.1.33
    gatsby-remark-images: ^3.1.39 => 3.1.39
    gatsby-remark-relative-images: ^0.2.3 => 0.2.3
    gatsby-source-filesystem: ^2.0.26 => 2.1.43
    gatsby-transformer-remark: ^2.6.45 => 2.6.45
    gatsby-transformer-sharp: ^2.1.9 => 2.3.9