diff options
| author | Fuwn <[email protected]> | 2025-06-02 12:27:53 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-06-02 12:27:53 +0000 |
| commit | 6cad62a1f6bd255bbc478fb2b4348cafe625ac9b (patch) | |
| tree | 34916fbb5acd601a425cd8d83e9660d17dc49dd1 /src | |
| parent | refactor: Use latest best practices and formatting (diff) | |
| download | germ-6cad62a1f6bd255bbc478fb2b4348cafe625ac9b.tar.xz germ-6cad62a1f6bd255bbc478fb2b4348cafe625ac9b.zip | |
fix(container): Safely unwrap line fragment
Diffstat (limited to 'src')
| -rw-r--r-- | src/ast/container.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ast/container.rs b/src/ast/container.rs index 00118bb..c890100 100644 --- a/src/ast/container.rs +++ b/src/ast/container.rs @@ -198,7 +198,7 @@ impl Ast { "=" if !*in_preformatted => { // If the Gemtext line starts with an "=" ("=>"), it is a link line, // so splitting it up should be easy enough. - let line = line.get(2..).unwrap(); + let line = line.get(2..).unwrap_or(""); let mut split = line .split_whitespace() .map(String::from) |