Skip to content

Commit

Permalink
Merge branch '31-support-hr-tags-markdown'
Browse files Browse the repository at this point in the history
  • Loading branch information
Eakam1007 committed Oct 1, 2022
2 parents 107aae5 + 6c49e1a commit f701e10
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,15 @@ This will create the optimized build in the ./target/release directory. Run the
This line is header
</h1>
```

- ### Thematic Break detection (horizontal rule) for .md files
```txt
---
```
will be converted into
```html
<hr />
```

# Examples
- ### One input file
Expand Down
2 changes: 2 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ fn convert_file(
read_buffer.remove(0);
read_buffer.remove(0);
write!(out_file, "<h1>\n{read_buffer}</h1>\n").expect("Generate html file");
} else if read_buffer == "---\n" || read_buffer == "---\r\n" {
write!(out_file, "<hr />\n").expect("Generate html file");
} else {
write!(out_file, "\t\t{}", read_buffer.clone()).expect("Generate html file");
}
Expand Down

0 comments on commit f701e10

Please sign in to comment.