Skip to content

Commit 3c75098

Browse files
committed
fix: gt || ge || lt || le
1 parent bb0116f commit 3c75098

File tree

5 files changed

+18
-13
lines changed

5 files changed

+18
-13
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ path = "src/bin/lc.rs"
44

55
[package]
66
name = "leetcode-cli"
7-
version = "0.2.11"
7+
version = "0.2.12"
88
authors = ["clearloop <udtrokia@163.com>"]
99
edition = "2018"
1010
description = "Leet your code in command-line."

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ cargo install leetcode-cli
2323
**Please make sure you have logined in `leetcode.com` with `chrome`**, more info plz checkout [this](#cookies)
2424

2525
```sh
26-
leetcode 0.2.11
26+
leetcode 0.2.12
2727
clearloop <udtrokia@163.com>
2828
May the Code be with You 👻
2929

src/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use clap::{App, AppSettings};
1313
pub fn main() -> Result<(), Error> {
1414
let m = App::new("leetcode")
1515
.author("clearloop <udtrokia@163.com>")
16-
.version("0.2.11")
16+
.version("0.2.12")
1717
.about("May the Code be with You 👻")
1818
.subcommands(vec![
1919
DataCommand::usage().display_order(1),

src/helper.rs

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,11 @@ mod html {
112112
let mut tks = self.to_string();
113113

114114
// converting symbols
115-
tks = tks.replace(r#"&lt;"#, "<");
116-
tks = tks.replace(r#"&gt;"#, ">");
117-
tks = tks.replace(r#"&amp;"#, "&");
118-
tks = tks.replace(r#"&quot;"#, "\"");
119-
tks = tks.replace(r#"&nbsp;"#, " ");
120-
tks = tks.replace(r#"&#39;"#, "'");
121-
tks = tks.replace(r#"&ge;"#, ">=");
122-
tks = tks.replace(r#"&le;"#, "<=");
115+
tks = tks
116+
.replace(r#"&amp;"#, "&")
117+
.replace(r#"&quot;"#, "\"")
118+
.replace(r#"&nbsp;"#, " ")
119+
.replace(r#"&#39;"#, "'");
123120

124121
let res: Vec<Token>;
125122
// styled
@@ -182,7 +179,15 @@ mod html {
182179
}
183180
}
184181

185-
tks.join("")
182+
// post replace
183+
let mut tks = tks.join("");
184+
tks = tks
185+
.replace(r#"&lt;"#, "<")
186+
.replace(r#"&gt;"#, ">")
187+
.replace(r#"&ge;"#, ">=")
188+
.replace(r#"&le;"#, "<=");
189+
190+
tks
186191
}
187192
}
188193
}

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
//! **Please make sure you have logined in `leetcode.com` with `chrome`**, more info plz checkout [this](#cookies)
2424
//!
2525
//! ```sh
26-
//! leetcode 0.2.11
26+
//! leetcode 0.2.12
2727
//! clearloop <udtrokia@163.com>
2828
//! May the Code be with You 👻
2929
//!

0 commit comments

Comments
 (0)