You are browsing as a guest. Sign up (or log in) to start making projects!

1h 42m 48s logged

Replaced hardcoded string colors with Color members for code safety, fixed line breaking while assigning a status/badge

Okay so Markup texts (those are the texts with color) were formatted in this format:

"[red]Hello World![/]"

So it was string-based. And if you accidentally added some character to it for instance:

"[redd]Hello World![/]" <- Exception

Helyx would crash. I mainly added this, because it is an open-source project. So if someone tried to edit it, they would only have to edit the string and they might have misspelled it. But now, when he goes into the codebase, he will see Color members and he just can’t misspell that, and if he would, compiler would alert him.

Basically, now it is like this:

$"[{Color.Red}]Hello World![/]"

Okay so next I fixed line breaking. What does that mean? Well… In Helyx native README editor, so when you try to assign a status/badge, you’ll get that editor, when you try to add a status/badge to that line, you might have thought that it would be on the same line as the tags above it.

But it didn’t…

This was happening due to the comment markers for Helyx so Helyx knows where this status/badge is located and which status/badge it is.

Now Helyx will put those comment markers in a way that prevents the line from breaking.

0
53

Comments 0

No comments yet. Be the first!