From dc699e2ee5f2316790fbb076959355caff718be4 Mon Sep 17 00:00:00 2001 From: KitsuneCafe <10284516+kitsunecafe@users.noreply.github.com> Date: Sun, 4 Feb 2024 14:57:32 -0500 Subject: [PATCH] add theme only constructor --- src/lib.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 83b078c..15fa9ec 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -27,6 +27,13 @@ impl<'a> SyntectParser<'a> { theme, } } + + pub fn with_theme(theme: &'a str) -> Self { + Self { + theme, + ..Default::default() + } + } } impl<'a> Default for SyntectParser<'a> {