From 8beb2bfa1af988442550c9e6999d924dd14b5236 Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Sat, 4 Jan 2025 23:04:42 +0100 Subject: Add the library --- src/lib.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/lib.rs (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..53acfcf --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,16 @@ +//! `gema_texto` parses gemtext and renders html. +//! +//! This library powers [blog](https://r.bdr.sh/blog.html) and +//! [page](https://r.bdr.sh/page.html), so it makes some decisions on +//! for those projects. Here's how each line is handled: +//! +//! - Headings and the content under them is wrapped in a `
` tag. +//! - All text lines are `

`, even empty ones. +//! - URLs are wrapped in a `

` +//! - Alt Text is supported for preformatted-toggles, and is written as +//! the aria-label of the `

` tag.
+//! - Consecutive list items are wrapped in a `
    ` and rendered as `
  • ` tags. +//! - Quotes are wrapped in a single `
    ` +//! +pub mod gemini_parser; +pub mod html_renderer; -- cgit