weirdpattern / gatsby-remark-embed-gist

Gatsby remark gists preprocessor
MIT License
30 stars 15 forks source link

Highlights and lines fail on files with a . prefix #35

Closed myedibleenso closed 4 years ago

myedibleenso commented 4 years ago

Thank you for the great plugin, @weirdpattern ! I'm using v1.2.0 with MDX and am running into issues rendering highlights and specific lines for files with a . prefex (ex. .travis.yml, .vimrc, etc.). Files without a leading . in their name render as expected.

Here's an example:

gist:tpope/1203867/.inputrc?highlights=7

...which should map to https://gist.github.com/tpope/1203867#file-inputrc-L7

In such cases, highlighted isn't appended as a class:

Specifying lines= for such files also seems to have no effect. All lines end up getting displayed.

I'm not really sure what's going on here, as the file is found and the regex you have defined replaces the leading . with - (.travis.yml -> -travis-yml).

🤔

Any ideas?

weirdpattern commented 4 years ago

Hi @myedibleenso I promise I will look into this as soon as I find the time. I've been playing catch up at work for a few weeks, but I think things are settling down now (I work in healthcare and I live in Texas, so pretty sure you get the idea 😷)

myedibleenso commented 4 years ago

Thanks, @weirdpattern , but please don't rush on my account. Stay safe out there!

weirdpattern commented 4 years ago

Closed by #38, going to release in a few moments.