3 ms·
Syntax highlighting is not enough to stand out sections and blocks either way. Few good ideas do exist (like #pragma mark + dropdown, etc), but it would be nice
by wruza 7y ago
Syntax highlighting is not enough to stand out sections and blocks either way. Few good ideas do exist (like #pragma mark + dropdown, etc), but it would be nice to see that in more languages and in greater usability.
#.h1 Auxiliary functions
#.h2 Date routines
function foo(x) {
#.summary {
// this foo does
// no bar, baz
}
#.fold {
assert(x != null)
}
}
code-style.css:
.summary > comment {
font-size: 20px;
color: red;
}
.fold {
display: fold;
}
function-kw {...}
function-name {...}
.h1 {
margin-top: 80px;
}
comment {
margin-top: 5px;
margin-left: 10px;
border-left: 2px solid grey;
}
id[name=“assert”] {
color: green;
}
That’s what cascades stylesheets were done for. Another advantage is that we could create color themes with css, not with some cryptic barely documented config. And then toggle read/edit/toc like your wiki page. We could write entire technical documents in it.
Sadly, that’s not possible as current mainstream stuck in raw text. We have all formatting for pointless blah-blah, but no formatting for a thing that manages everything.