germ/
lib.rs

1// This file is part of Germ <https://github.com/gemrest/germ>.
2// Copyright (C) 2022-2025 Fuwn <contact@fuwn.me>
3//
4// This program is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation, version 3.
7//
8// This program is distributed in the hope that it will be useful, but
9// WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11// General Public License for more details.
12//
13// You should have received a copy of the GNU General Public License
14// along with this program. If not, see <http://www.gnu.org/licenses/>.
15//
16// Copyright (C) 2022-2025 Fuwn <contact@fuwn.me>
17// SPDX-License-Identifier: GPL-3.0-only
18
19#![deny(
20  warnings,
21  nonstandard_style,
22  unused,
23  future_incompatible,
24  rust_2018_idioms,
25  unsafe_code,
26  clippy::all,
27  clippy::nursery,
28  clippy::pedantic
29)]
30#![recursion_limit = "128"]
31
32#[cfg(feature = "ast")] pub mod ast;
33
34#[cfg(feature = "convert")] pub mod convert;
35
36#[cfg(feature = "request")] pub mod request;
37
38#[cfg(feature = "meta")] pub mod meta;
39
40#[cfg(feature = "quick")] pub mod quick;
41
42#[cfg(feature = "example-gemtext")]
43pub const EXAMPLE_GEMTEXT: &str = r"```This is alt-text
44Here goes the pre-formatted text.
45
46This continues the pre-formatted text on a new line after a blank line.
47```
48
49# This is a heading
50
51This is some text.
52
53This is more text after a blank line.
54
55* This is a single list item.
56* This is the next list item.
57
58* This is a new list.
59* This is the next item on the new list.
60
61## This is a sub-heading
62
63> This is a blockquote.
64
65### This is a sub-sub-heading.
66
67=> gemini://gem.rest/ This is a link to GemRest
68=> /somewhere
69
70```This is a preformatted block containing inner Gemtext.
71=> gemini://fuwn.me/ This is a link.
72
73* This is a list item.
74
75> This is a blockquote.
76
77# This is a heading.
78
79## This is a sub-heading.
80
81### This is a sub-sub-heading.
82```
83
84That was a link without text.";