From 8a29596b18a9a01a160da2002714cf6e8c62bc5c Mon Sep 17 00:00:00 2001 From: Manuel Cillero Date: Tue, 6 Jan 2026 01:18:45 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Retoques=20menores=20en=20docume?= =?UTF-8?q?ntaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- helpers/pagetop-macros/src/lib.rs | 2 +- src/html/unit.rs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/helpers/pagetop-macros/src/lib.rs b/helpers/pagetop-macros/src/lib.rs index 6916d3fe..1630137a 100644 --- a/helpers/pagetop-macros/src/lib.rs +++ b/helpers/pagetop-macros/src/lib.rs @@ -85,7 +85,7 @@ pub fn html(input: TokenStream) -> TokenStream { /// b: 0, /// c: Some(0), /// d: vec![1, 2, 3], -/// e: "four".to_owned(), +/// e: "four".to_string(), /// }); /// # } /// ``` diff --git a/src/html/unit.rs b/src/html/unit.rs index aec40372..5096ad4f 100644 --- a/src/html/unit.rs +++ b/src/html/unit.rs @@ -7,7 +7,7 @@ use std::str::FromStr; /// Representa una **unidad CSS** lista para formatear o deserializar. /// -/// ## Unidades soportadas +/// # Unidades soportadas /// /// - **Absolutas** *(valores enteros, `isize`)*: /// - `Cm(isize)` - `cm` (centímetros) @@ -24,13 +24,13 @@ use std::str::FromStr; /// - `RelVh(f32)` - `vh` (1% de la **altura** del viewport) /// - `RelVw(f32)` - `vw` (1% del **ancho** del viewport) /// -/// ## Valores especiales +/// # Valores especiales /// /// - `None` - equivale a un texto vacío (`""`), útil para atributos opcionales. /// - `Auto` - equivale a `"auto"`. /// - `Zero` - equivale a `"0"` (cero sin unidad). /// -/// ## Características +/// # Características /// /// - Soporta unidades **absolutas** (`cm`, `in`, `mm`, `pc`, `pt`, `px`) y **relativas** (`em`, /// `rem`, `%`, `vh`, `vw`). @@ -38,7 +38,7 @@ use std::str::FromStr; /// - `Display` para formatear a cadena (p. ej., `UnitValue::Px(12)` genera `"12px"`). /// - `Deserialize` delega en `FromStr`, garantizando una gramática única. /// -/// ## Ejemplos +/// # Ejemplos /// /// ```rust /// # use pagetop::prelude::*; @@ -52,7 +52,7 @@ use std::str::FromStr; /// assert_eq!(UnitValue::from_str("0").unwrap(), UnitValue::Zero); /// ``` /// -/// ## Notas +/// # Notas /// /// - Las absolutas **no aceptan** decimales (p. ej., `"1.5px"` sería erróneo). /// - Se aceptan signos `+`/`-` en todas las unidades (p. ej., `"-12px"`, `"+0.5em"`).