From c8cc252a4564369abcfaa81ee2d5e0bf453a7cbc Mon Sep 17 00:00:00 2001 From: Malo <57839069+MDLC01@users.noreply.github.com> Date: Tue, 30 Apr 2024 14:22:20 +0200 Subject: [PATCH] Add keywords for `emph` and `strong` functions (#3980) --- crates/typst/src/model/emph.rs | 2 +- crates/typst/src/model/strong.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/typst/src/model/emph.rs b/crates/typst/src/model/emph.rs index a4c916ed4..e36e5ef7f 100644 --- a/crates/typst/src/model/emph.rs +++ b/crates/typst/src/model/emph.rs @@ -26,7 +26,7 @@ use crate::text::{ItalicToggle, TextElem}; /// This function also has dedicated syntax: To emphasize content, simply /// enclose it in underscores (`_`). Note that this only works at word /// boundaries. To emphasize part of a word, you have to use the function. -#[elem(title = "Emphasis", Show)] +#[elem(title = "Emphasis", keywords = ["italic"], Show)] pub struct EmphElem { /// The content to emphasize. #[required] diff --git a/crates/typst/src/model/strong.rs b/crates/typst/src/model/strong.rs index 95d1575a7..0e23179e6 100644 --- a/crates/typst/src/model/strong.rs +++ b/crates/typst/src/model/strong.rs @@ -21,7 +21,7 @@ use crate::text::{TextElem, WeightDelta}; /// simply enclose it in stars/asterisks (`*`). Note that this only works at /// word boundaries. To strongly emphasize part of a word, you have to use the /// function. -#[elem(title = "Strong Emphasis", Show)] +#[elem(title = "Strong Emphasis", keywords = ["bold", "weight"], Show)] pub struct StrongElem { /// The delta to apply on the font weight. ///