Skip to content

Commit

Permalink
Merge pull request 'Update CHANGELOG' (Plume-org#854) from changelog …
Browse files Browse the repository at this point in the history
  • Loading branch information
KitaitiMakoto committed Dec 28, 2020
2 parents 11acc41 + 17b081a commit 39b2ef7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@

## [Unreleased] - ReleaseDate

## [[0.6.0]] - 2020-12-19
## [[0.6.0]] - Unreleased

### Added

- Vazir font for better support of languages written in Arabic script (#787)
- Login via LDAP (#826)
- cargo-release (#835)
- Care about weak ETag header for better caching (#840)
- Support for right to left languages in post content (#853)

### Changed

Expand Down
19 changes: 11 additions & 8 deletions plume-common/src/utils.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use heck::CamelCase;
use openssl::rand::rand_bytes;
use pulldown_cmark::{html, LinkType, Event, Options, Parser, Tag, CodeBlockKind, CowStr};
use pulldown_cmark::{html, CodeBlockKind, CowStr, Event, LinkType, Options, Parser, Tag};
use regex_syntax::is_word_character;
use rocket::{
http::uri::Uri,
Expand Down Expand Up @@ -69,7 +69,7 @@ fn highlight_code<'a>(
match &kind {
CodeBlockKind::Fenced(lang) if !lang.is_empty() => {
*context = Some(HighlighterContext { content: vec![] });
},
}
_ => {}
}
Some(vec![Event::Start(Tag::CodeBlock(kind))])
Expand Down Expand Up @@ -169,18 +169,21 @@ fn process_image<'a, 'b>(
if let Some((url, cw)) = id.parse::<i32>().ok().and_then(processor.as_ref()) {
if let (Some(cw), false) = (cw, inline) {
// there is a cw, and where are not inline
Event::Html(CowStr::Boxed(format!(
r#"<label for="postcontent-cw-{id}">
Event::Html(CowStr::Boxed(
format!(
r#"<label for="postcontent-cw-{id}">
<input type="checkbox" id="postcontent-cw-{id}" checked="checked" class="cw-checkbox">
<span class="cw-container">
<span class="cw-text">
{cw}
</span>
<img src="{url}" alt=""#,
id = random_hex(),
cw = cw,
url = url
).into()))
id = random_hex(),
cw = cw,
url = url
)
.into(),
))
} else {
Event::Start(Tag::Image(typ, CowStr::Boxed(url.into()), title))
}
Expand Down

0 comments on commit 39b2ef7

Please # to comment.