diff --git a/src/lib.rs b/src/lib.rs index dca2d3c..7a16f41 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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 _\_ #[proc_macro] pub fn paragraph(input: TokenStream) -> TokenStream { base("p", input)