WebBlocks icon indicating copy to clipboard operation
WebBlocks copied to clipboard

Syntax highlighting component

Open r4pt0s opened this issue 4 years ago • 10 comments

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.

r4pt0s avatar Oct 03 '21 18:10 r4pt0s

I would like to try to work on it

marichka-offen avatar Oct 04 '21 22:10 marichka-offen

@marichka-offen Go for it 💪🏻

r4pt0s avatar Oct 05 '21 04:10 r4pt0s

@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.

marichka-offen avatar Oct 18 '21 19:10 marichka-offen

No worries @marichka-offen.

r4pt0s avatar Oct 19 '21 05:10 r4pt0s

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

juancwu avatar Oct 25 '21 02:10 juancwu

@juancwu Go for it 💪🏻

r4pt0s avatar Oct 25 '21 05:10 r4pt0s

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.

juancwu avatar Oct 26 '21 04:10 juancwu

@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

r4pt0s avatar Oct 26 '21 09:10 r4pt0s

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

juancwu avatar Nov 01 '21 04:11 juancwu

No worries @juancwu

r4pt0s avatar Nov 01 '21 06:11 r4pt0s