zero-to-mastery / WebBlocks

zero-to-mastery re-usable web component library.
https://zero-to-mastery.github.io/WebBlocks/
MIT License
22 stars 60 forks source link

Syntax highlighting component #29

Open r4pt0s opened 3 years ago

r4pt0s commented 3 years ago

You can see on all available dev blog sites sections where code samples get provided. Goal of this component is a easy way to make code snippets look good with minimal usage effort.

It should receive at least one prop which should be the language prop. The code which should get highlighted should be received via a slot.

marichka-offen commented 3 years ago

I would like to try to work on it

r4pt0s commented 3 years ago

@marichka-offen Go for it 💪🏻

marichka-offen commented 3 years ago

@r4pt0s I apologize for not being able to complete this challenge. October got crazy busy. I would like to step away and give somebody else opportunity to contribute on this feature.

r4pt0s commented 3 years ago

No worries @marichka-offen.

juancwu commented 3 years ago

This component sounds a like lot of fun and I would like to try and make it!!

r4pt0s commented 3 years ago

@juancwu Go for it 💪🏻

juancwu commented 3 years ago

Hi @r4pt0s, how complex should the code highlighting component be? Should it have its own formatter so that the given code is properly formatted within the size of the component? Should it have different highlighting for difference programming languages? Should it support multi-line code? Should the final product underline syntax mistakes?

Sorry for bombing you with so many questions but I just want to make sure in order to make a design that is more maintainable in the future.

r4pt0s commented 3 years ago

@juancwu Those are all good questions. I would say we just start with html, css and Javascript. There is actually a starting point on w3schools

Multi-line=> yes Code errors => no

juancwu commented 3 years ago

Hi @r4pt0s, I find myself unable to complete this component. Sorry for the late notice.

r4pt0s commented 3 years ago

No worries @juancwu