Replying to Avatar Niel Liesmons

https://cdn.satellite.earth/12c1073a7c38046b85ab0ee90f2841fbb6722e2d34370a126ee43c30b5e7737d.mov

Working on #asciidoc parsing and rendering in #Flutter.

Needed a code block widget.

Still need to figure out how to add syntax highlighting.

Feel free to wrap the long lines on small screens!

IMHO Syntax highlighting is quite a large bit of code that is better done on a server than packaged in the app.

Reply to this note

Please Login to reply.

Discussion

Thanks!

1) Why wrap it? Every time I do that, the code becomes unreadable to me. Maybe most devs don' have that issue though, you tell me. I'm just looking at the main benchmarks out there for this stuff.

2) Agree, that's why I don't know how to approach it just yet. I might just implement some really elemantary coloring of the brackets and every thing between "..." and basta.

1. Yes, maybe wrapping is a preference and that's just what I'm used to and that's why I find the side scrolling annoying

2. Syntax highlight lite! I like that idea and it would definitely help make code blocks more readable.

Not sure if this might be of interest?

https://www.theswift.dev/posts/i-made-a-swift-syntax-highlighting-app

Or maybe see how these work under the hood

https://fluttergems.dev/editor-syntax-highlighter/

MMM no, I'll think I'll stick #syntaxlite 😉

Just focussing on the:

{ [ ( . , and text between "..." and '...' and <...>

Should take of the 80% that matters fir readability.

And doesn't force me into using a gazillion colors that have zero match with my design system.