Fix quotes and monospace

- Fix parsing of empty quote lines
- Fix style of monospace
pull/1/head
trivernis 5 years ago
parent 03ebed6277
commit 345bde509c

2
Cargo.lock generated

@ -444,7 +444,7 @@ dependencies = [
[[package]]
name = "snekdown"
version = "0.2.3"
version = "0.2.4"
dependencies = [
"crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"htmlescape 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",

@ -1,6 +1,6 @@
[package]
name = "snekdown"
version = "0.2.3"
version = "0.2.4"
authors = ["trivernis <trivernis@protonmail.com>"]
edition = "2018"
license-file = "LICENSE"

@ -26,9 +26,11 @@ code pre {
border-radius: 0.25em;
}
code {
code.inlineCode {
font-family: "Fira Code", monospace;
border-radius: 0.1em;
background-color: #EEE;
padding: 0 0.1em
}
.tableWrapper {

@ -301,7 +301,7 @@ impl ToHtml for StrikedText {
impl ToHtml for MonospaceText {
fn to_html(&self) -> String {
format!("<code>{}</code>", self.value.to_html())
format!("<code class='inlineCode'>{}</code>", self.value.to_html())
}
}

@ -417,7 +417,7 @@ impl Parser {
while self.check_special(&QUOTE_START)
&& self.next_char() != None
&& self.check_seek_inline_whitespace()
&& (self.check_seek_inline_whitespace() || self.check_special(&LB))
{
if let Ok(text) = self.parse_text() {
if text.subtext.len() > 0 {

Loading…
Cancel
Save