reduced code repetition in `fill_from_tomlconfig`
This commit is contained in:
parent
6d8ac6a23c
commit
d42ef1cdbc
|
@ -40,19 +40,11 @@ impl HtmlConfig {
|
||||||
let root = root.into();
|
let root = root.into();
|
||||||
|
|
||||||
if let Some(d) = tomlconfig.destination {
|
if let Some(d) = tomlconfig.destination {
|
||||||
if d.is_relative() {
|
self.set_destination(&root, &d);
|
||||||
self.destination = root.join(d);
|
|
||||||
} else {
|
|
||||||
self.destination = d;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(t) = tomlconfig.theme {
|
if let Some(t) = tomlconfig.theme {
|
||||||
if t.is_relative() {
|
self.set_theme(&root, &t);
|
||||||
self.theme = root.join(t);
|
|
||||||
} else {
|
|
||||||
self.theme = t;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(curly_quotes) = tomlconfig.curly_quotes {
|
if let Some(curly_quotes) = tomlconfig.curly_quotes {
|
||||||
|
|
Loading…
Reference in New Issue