Docs: Links and desciptions for number types (#6752)
Links and desciptions for number types Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
@ -664,7 +664,9 @@ fn cleanup_type_string(input: &str, fmt_for_text: bool) -> String {
|
||||
// If we can handle signatures more manually we could get highlighting and links and
|
||||
// we might want to restore the links by not checking `fmt_for_text` here.
|
||||
|
||||
if fmt_for_text && SPECIAL_TYPES.contains(&ty) {
|
||||
if fmt_for_text && ty.starts_with("number") {
|
||||
format!("[{prefix}{ty}{suffix}](/docs/kcl-std/types/std-types-number)")
|
||||
} else if fmt_for_text && SPECIAL_TYPES.contains(&ty) {
|
||||
format!("[{prefix}{ty}{suffix}](/docs/kcl-lang/types#{ty})")
|
||||
} else if fmt_for_text && DECLARED_TYPES.contains(&ty) {
|
||||
format!("[{prefix}{ty}{suffix}](/docs/kcl-std/types/std-types-{ty})")
|
||||
|
Reference in New Issue
Block a user