Added documentation for paragraph
This commit is contained in:
15
src/lib.rs
15
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 _\<br\>_
|
||||
#[proc_macro]
|
||||
pub fn paragraph(input: TokenStream) -> TokenStream {
|
||||
base("p", input)
|
||||
|
||||
Reference in New Issue
Block a user