aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler.rs
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-07-18 16:34:56 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-07-18 16:35:00 +0200
commit7186ce91784a647b3015e04b55a95b109deceeb3 (patch)
tree79e9c0bf255826a2aca0e27b324e120facaf972e /src/compiler.rs
parent5403261e8213f68633a09fc3e9bc2e6e2cd777b2 (diff)
downloadmarkdown-rs-7186ce91784a647b3015e04b55a95b109deceeb3.tar.gz
markdown-rs-7186ce91784a647b3015e04b55a95b109deceeb3.tar.bz2
markdown-rs-7186ce91784a647b3015e04b55a95b109deceeb3.zip
Change to improve `default_line_ending` api
Diffstat (limited to 'src/compiler.rs')
-rw-r--r--src/compiler.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/compiler.rs b/src/compiler.rs
index db52837..0993987 100644
--- a/src/compiler.rs
+++ b/src/compiler.rs
@@ -247,10 +247,8 @@ pub fn compile(events: &[Event], codes: &[Code], options: &Options) -> String {
// Figure out which line ending style we’ll use.
let line_ending_default = if let Some(value) = line_ending_inferred {
value
- } else if let Some(value) = &options.default_line_ending {
- value.clone()
} else {
- LineEnding::LineFeed
+ options.default_line_ending.clone()
};
let mut enter_map: Map = HashMap::new();