Improve documentation of html, svg, mathml modules

This commit is contained in:
Joscha 2024-12-02 18:56:41 +01:00
parent ccde0556f8
commit af3c2deb7f
3 changed files with 12 additions and 9 deletions

View file

@ -1,6 +1,5 @@
//! Definitions for all non-deprecated HTML elements.
//!
//! <https://developer.mozilla.org/en-US/docs/Web/HTML/Element>
//! Definitions for all non-deprecated HTML elements
//! ([MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element)).
use crate::{Element, ElementComponent, ElementKind};
@ -9,6 +8,8 @@ macro_rules! element {
element!($name, ElementKind::Normal);
};
( $name:ident, $kind:expr ) => {
#[doc = concat!("The `<", stringify!($name), ">` tag")]
#[doc = concat!("([MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/", stringify!($name), ")).")]
pub fn $name(c: impl ElementComponent) -> Element {
Element::new(stringify!($name), $kind).with(c)
}

View file

@ -1,6 +1,5 @@
//! Definitions for all non-deprecated MathML elements.
//!
//! <https://developer.mozilla.org/en-US/docs/Web/MathML/Element>
//! Definitions for all non-deprecated MathML elements
//! ([MDN](https://developer.mozilla.org/en-US/docs/Web/MathML/Element)).
use crate::{Element, ElementComponent, ElementKind};
@ -9,6 +8,8 @@ macro_rules! element {
element!($name, stringify!($name));
};
( $name:ident, $tag:expr ) => {
#[doc = concat!("The `<", $tag, ">` tag")]
#[doc = concat!("([MDN](https://developer.mozilla.org/en-US/docs/Web/MathML/Element/", $tag, ")).")]
pub fn $name(c: impl ElementComponent) -> Element {
Element::new($tag, ElementKind::Foreign).with(c)
}

View file

@ -1,6 +1,5 @@
//! Definitions for all non-deprecated SVG elements.
//!
//! <https://developer.mozilla.org/en-US/docs/Web/SVG/Element>
//! Definitions for all non-deprecated SVG elements
//! ([MDN](https://developer.mozilla.org/en-US/docs/Web/SVG/Element)).
use crate::{Element, ElementComponent, ElementKind};
@ -9,6 +8,8 @@ macro_rules! element {
element!($name, stringify!($name));
};
( $name:ident, $tag:expr ) => {
#[doc = concat!("The `<", $tag, ">` tag")]
#[doc = concat!("([MDN](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/", $tag, ")).")]
pub fn $name(c: impl ElementComponent) -> Element {
Element::new($tag, ElementKind::Foreign).with(c)
}