This fixes#1668, because the crashing listbox rendering code uses "len(line) >
0" (where line is a ui.Text) to test whether it is non-empty. This test doesn't
work with the ui.Text constructed using "styled ''", which creates a ui.Text
with one empty segment.
The functions from the ui package are guaranteed to never return such ui.Text
instances, so switching the implementation of the styled builtin to functions
from the ui package fixes this.
* Correct slice indexing convention in code comment
A colon is not supported.
* Add more key slices tests
* Unify `has-key` tests with those from `pkg/eval/vals/has_key_test.go`
* Fix key slice format in documentation
Fixes#1646.
* Fix missing bracket
* Fix indexing
* Add more key slices `has-key` tests
* Fix `has-key` test expected value
For example, [`put`]() links to the elvdoc for "put".
Also remove the @cf macro now that implicit targets make it easier to link to
other elvdoc sections.
For example, a link to language.html#number is converted to point to
https://elv.sh/ref/language.html#number instead. Such links are quite common in
elvdocs.
Also convert all link destinations that use ./language.html to use language.html
instead, and add a check in tools/check-disallowed.sh to ensure that remains the
case.
The Error methods used to show the start and end indices, while the Show methods
used to show line ranges.
Showing line:col of the start position seems to be pretty standard; both Go and
Rust do that.
I tried including the line:col of the end position too, but can't find a good
enough format.
The Errors function is not related to diag.Error, so keeping it in the same
package is confusing.
Also unexport the MultiError type. This allows its Error method to be
simplified, as it can assume that it always contains at least 2 errors.
We are no longer using Pandoc, so this limitation can be lifted.
Also make @cf generate internal links where applicable in non-builtin modules:
"@cf mod:fn" in the doc of "mod" now links to just "#mod:fn" instead of
"mod.html#mod:fn".
The elvdocs still use the old format (#elvdoc:fn or #elvdoc:var) for now, but
will be changed to "fn" and "var" forms soon.
Also remove the accidentally committed cmd/mvelvdoc. It has been used to perform
the conversion automatically but is not supposed to be committed.