Use type literals for comparison (#112)
This commit is contained in:
6
lib.typ
6
lib.typ
@@ -225,7 +225,7 @@
|
|||||||
use-smallcaps: true,
|
use-smallcaps: true,
|
||||||
body,
|
body,
|
||||||
) = {
|
) = {
|
||||||
if type(accent-color) == "string" {
|
if type(accent-color) == str {
|
||||||
accent-color = rgb(accent-color)
|
accent-color = rgb(accent-color)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -507,7 +507,7 @@
|
|||||||
location-color: default-location-color,
|
location-color: default-location-color,
|
||||||
) = {
|
) = {
|
||||||
let title-content
|
let title-content
|
||||||
if type(title-link) == "string" {
|
if type(title-link) == str {
|
||||||
title-content = link(title-link)[#title]
|
title-content = link(title-link)[#title]
|
||||||
} else {
|
} else {
|
||||||
title-content = title
|
title-content = title
|
||||||
@@ -608,7 +608,7 @@
|
|||||||
use-smallcaps: true,
|
use-smallcaps: true,
|
||||||
body,
|
body,
|
||||||
) = {
|
) = {
|
||||||
if type(accent-color) == "string" {
|
if type(accent-color) == str {
|
||||||
accent-color = rgb(accent-color)
|
accent-color = rgb(accent-color)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user