Giter Site home page Giter Site logo

Comments (10)

AhsanAyaz avatar AhsanAyaz commented on May 14, 2024 1

Yeah 😄
If it was just adding the pluginOption, you'd already have a PR from me 😄 .
I guess we'll have to think it through on how to do this. I'm gonna spend some time looking at this. Feel free to share any ideas that you get as well.

from gatsby-remark-highlight-code.

AhsanAyaz avatar AhsanAyaz commented on May 14, 2024 1

Ah 😲 ! Now I got it.
Sure. Will implement the correct format and will update the PR.

from gatsby-remark-highlight-code.

peterpeterparker avatar peterpeterparker commented on May 14, 2024 1

Sweet, looks good!

I'll test the PR with my website tomorrow after work. If all good (I have no doubt, looks cool), merge and release afterwards.

I keep you posted, good night.

from gatsby-remark-highlight-code.

peterpeterparker avatar peterpeterparker commented on May 14, 2024

Sure good idea, we should add highlightLines to the list of pluginOptions

from gatsby-remark-highlight-code.

peterpeterparker avatar peterpeterparker commented on May 14, 2024

I checked again but, I see an issue. The pluginOptions are global for the site. To the contrary, highlightLines is probably something you want to use on a particular piece of code of the website (like this code lines 1 to 3, that one 5 to 8).

Not sure how we should solve this, any idea ?

from gatsby-remark-highlight-code.

peterpeterparker avatar peterpeterparker commented on May 14, 2024

Thanks for having a look, that would be really nice 😃.

Spontaneously I am thinking that instead of property/attributes maybe it can be solved with CSS4 variables. The component would had to be modified to read these but, it would allow users to specify lines even when using the plugin. Not sure it would work and there are probably better solutions. Looking forward to your ideas!

from gatsby-remark-highlight-code.

AhsanAyaz avatar AhsanAyaz commented on May 14, 2024

@peterpeterparker I did something ☝️ 🙂
The applies the attribute's value correctly to the <deckgo-highlight-code> properly. However, the deckgo-highlight-code component itself doesn't work fine with it for some reason. See the image attached:
Screenshot 2021-02-16 at 20 30 55

from gatsby-remark-highlight-code.

peterpeterparker avatar peterpeterparker commented on May 14, 2024

thx for the PR @AhsanAyaz 🙏

it doesn't highlight lines because of the format. instead of 4 7, 20 35 it should parse 4,5 20,35, the coma being the separate for "from,to" and the space being the separator between "group".

would you like to give a try and let me know if it works out?

cool idea and solution 👍

from gatsby-remark-highlight-code.

peterpeterparker avatar peterpeterparker commented on May 14, 2024

Awesome! keep me posted and let me know if I can do anything.

from gatsby-remark-highlight-code.

AhsanAyaz avatar AhsanAyaz commented on May 14, 2024

Just pushed the code to the PR with the right format and fixed tests.
Seems cool now:
image

from gatsby-remark-highlight-code.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.