Skip to content

Commit

Permalink
feat: commit code
Browse files Browse the repository at this point in the history
  • Loading branch information
mrxiaozhuox committed Mar 18, 2022
1 parent 05eb4da commit 2daf427
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "markdown-meta-parser"
version = "0.1.0"
version = "0.1.1"
edition = "2021"
authors = ["YuKun Liu <[email protected]>"]
license = "MIT"
Expand Down
10 changes: 9 additions & 1 deletion examples/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,12 @@ released: false

# This is my first post!

Hello World!!
Hello World!!

---

```json
{
"hello": "Hello World"
}
```
4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ impl MetaData {
for line in content.lines() {
if line.trim() == "---" {
state += 1;
continue;
if state < 3 {
continue;
}
} else if state == 0 {
state = 2;
}
Expand Down

0 comments on commit 2daf427

Please sign in to comment.