Replies: 1 comment 3 replies
-
For what is worth, like: running 1 test
test cursive-core/src/utils/markup/cursup.rs - utils::markup::cursup (line 5) ... FAILED
failures:
---- cursive-core/src/utils/markup/cursup.rs - utils::markup::cursup (line 5) stdout ----
error: expected expression, found `/`
--> cursive-core/src/utils/markup/cursup.rs:6:1
|
3 | /red{This} /green{text} /blue{is} /bold{very} /underline{styled}!
| ^ expected expression
error: aborting due to 1 previous error
Couldn't compile the test.
failures:
cursive-core/src/utils/markup/cursup.rs - utils::markup::cursup (line 5)
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 142 filtered out; finished in 0.05s
error: doctest failed, to rerun pass `-p cursive_core --doc` What's curious is, that none of these catch it: (which is why I've been using all 4 when checking for breakage, manually, locally) I should probably mention that for -[dependencies.bear-lib-terminal]
-optional = true
-version = "2"
+#[dependencies.bear-lib-terminal]
+#optional = true
+#version = "2"
-blt-backend = ["bear-lib-terminal"]
+#blt-backend = ["bear-lib-terminal"] |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm thinking of adding support to a new minimal markup format meant to more easily generate
StyledString
.I'd like it to be simpler than html
<red>This text<red> is written in red
.I like the latex style of
\foo{bar}{baz}
. Unfortunately, the way to use colors in latex is actually a bit verbose:\textcolor{red}{This text} is written in red
or{\textcolor{red}This text} is written in red
. In addition, using backslashes would be annoying without raw strings, which puts limitations on inserting unicode characters by code. An alternative I've been toying with is/red{This text} is written in red
. There could be a few variations to bikeshed that:/red{This text} is written in red
{This text}{red} is written in red
In addition, to apply multiple styles, we could combine them like
/red+bold{warning}
. Maybe also allow setting the background color withback=
orback.
:/red+back=blue{foobar}
/red+back.blue{foobar}
The current
main
branch has a basic implementation for/red+bold{foobar}
(no background color yet though). It's also currently not dealing well with nested styles like/red{Read /bold{that}}
- at the moment it should be flattened to/red{Read }/red+bold{that}
. That's just a limitation of the basic regex I'm using - I'll replace the implementation to be more robust (and maybe not need regex at all, so it would not be behind a feature flag).Beta Was this translation helpful? Give feedback.
All reactions