Comments (10)
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.
Ah 😲 ! Now I got it.
Sure. Will implement the correct format and will update the PR.
from gatsby-remark-highlight-code.
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.
Sure good idea, we should add highlightLines
to the list of pluginOptions
from gatsby-remark-highlight-code.
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.
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.
@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:
from gatsby-remark-highlight-code.
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.
Awesome! keep me posted and let me know if I can do anything.
from gatsby-remark-highlight-code.
Just pushed the code to the PR with the right format and fixed tests.
Seems cool now:
from gatsby-remark-highlight-code.
Related Issues (20)
- Syntax highlighting not working on deployed site HOT 7
- Configuration does not take effect afterwards HOT 9
- Unable to display code if language is not supported HOT 3
- Unable to highlight a single line using the current parseLanguageAndHighlightedLines implementation HOT 5
- couldnt get this to work HOT 11
- No highlights by default? HOT 7
- Hide the colored balls in Carbon theme HOT 1
- Highlight-lines does not work anymore
- It looks like language mermaid is not supported HOT 6
- How do I override inlineCode? HOT 7
- Hiding the header? HOT 1
- Overflow: scroll HOT 1
- Disabling wordwrap / enabling overflow:scroll? HOT 1
- Config for prismjs? HOT 3
- Support for gatsby 4? HOT 7
- Rerendering deckgo-highlight-code compontent on state change HOT 3
- My code doesn't highlight. HOT 1
- Support for gatsby 5? HOT 7
- Plugin doesnt work in gatsby v5 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gatsby-remark-highlight-code.