mirror of
https://github.com/typst/typst
synced 2025-07-27 14:27:56 +08:00
docs: fixup some comments
This commit is contained in:
parent
6717a18414
commit
09b2cd6de5
@ -192,10 +192,11 @@ pub enum TableHeaderScope {
|
|||||||
/// TODO: maybe generalize this and use it to mark html elements with `aria-hidden="true"`?
|
/// TODO: maybe generalize this and use it to mark html elements with `aria-hidden="true"`?
|
||||||
#[elem(Locatable, Show)]
|
#[elem(Locatable, Show)]
|
||||||
pub struct ArtifactElem {
|
pub struct ArtifactElem {
|
||||||
|
/// The artifact kind.
|
||||||
#[default(ArtifactKind::Other)]
|
#[default(ArtifactKind::Other)]
|
||||||
pub kind: ArtifactKind,
|
pub kind: ArtifactKind,
|
||||||
|
|
||||||
/// The content to underline.
|
/// The content that is an artifact.
|
||||||
#[required]
|
#[required]
|
||||||
pub body: Content,
|
pub body: Content,
|
||||||
}
|
}
|
||||||
|
@ -325,9 +325,8 @@ pub(crate) fn handle_start(gc: &mut GlobalContext, elem: &Content) {
|
|||||||
.and_then(StackEntryKind::as_standard_mut)
|
.and_then(StackEntryKind::as_standard_mut)
|
||||||
.filter(|tag| tag.kind == TagKind::Figure);
|
.filter(|tag| tag.kind == TagKind::Figure);
|
||||||
if let Some(figure_tag) = figure_tag {
|
if let Some(figure_tag) = figure_tag {
|
||||||
|
// Set alt text of outer figure tag, if not present.
|
||||||
if figure_tag.alt_text.is_none() {
|
if figure_tag.alt_text.is_none() {
|
||||||
// HACK: set alt text of outer figure tag, if the contained image
|
|
||||||
// has alt text specified
|
|
||||||
figure_tag.alt_text = alt;
|
figure_tag.alt_text = alt;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user