Added documentation for paragraph

This commit is contained in:
2026-03-02 23:48:44 +01:00
parent d6052a624e
commit 403620396b

View File

@@ -77,6 +77,21 @@ impl Parse for BaseElement {
}
}
/// # HTML Paragraph element
/// # Usage:
/// ```rust
/// use web_macro::paragraph;
/// let single_line = paragraph!("This is my lovely text to be displayed", id="title", class="small blue");
/// let multi_line = paragraph!(
/// "This is my lovely text to be displayed",
/// "This is another line that constitutes my paragraph",
/// id="title",
/// class="small blue"
/// );
/// ```
/// # Notes:
/// - This element supports child insertions, see usage.
/// - Adding multiple children will **not** insert _\<br\>_
#[proc_macro]
pub fn paragraph(input: TokenStream) -> TokenStream {
base("p", input)