Function libmedium::post::apply_markup
source · pub fn apply_markup<'b>(
data: &GetPostPost,
gists: &'b Option<Vec<(String, GistContent)>>
) -> Vec<String> ⓘ
diff --git a/libmedium/post/fn.apply_markup.html b/libmedium/post/fn.apply_markup.html index ff2d738..919a621 100644 --- a/libmedium/post/fn.apply_markup.html +++ b/libmedium/post/fn.apply_markup.html @@ -1 +1 @@ -
pub fn apply_markup<'b>(
data: &GetPostPost,
gists: &'b Option<Vec<(String, GistContent)>>
) -> Vec<String> ⓘ
pub fn apply_markup<'b>(
data: &GetPostPost,
gists: &'b Option<Vec<(String, GistContent)>>
) -> Vec<String> ⓘ
markup: &'a GetPostPostContentBodyModelParagraphsMarkups
§p: &'a GetPostPostContentBodyModelParagraphs
§pos_type: PostitionType
§gists: &'b Option<Vec<(String, GistContent)>>
Returns the argument unchanged.
+}markup: &'a GetPostPostContentBodyModelParagraphsMarkups
§p: &'a GetPostPostContentBodyModelParagraphs
§pos_type: PostitionType
§gists: &'b Option<Vec<(String, GistContent)>>
Calls U::from(self)
.
struct PositionMap<'a, 'b> {
+PositionMap in libmedium::post - Rust Struct libmedium::post::PositionMap
source · Fields§
§map: HashMap<i64, Vec<Markup<'a, 'b>>>
§arr: Vec<i64>
Implementations§
source§impl<'a, 'b> PositionMap<'a, 'b>
sourcefn insert_if_not_exists(&mut self, pos: i64, m: Markup<'a, 'b>)
Trait Implementations§
source§impl<'a, 'b> Default for PositionMap<'a, 'b>
source§fn default() -> PositionMap<'a, 'b>
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl<'a, 'b> RefUnwindSafe for PositionMap<'a, 'b>
§impl<'a, 'b> Send for PositionMap<'a, 'b>
§impl<'a, 'b> Sync for PositionMap<'a, 'b>
§impl<'a, 'b> Unpin for PositionMap<'a, 'b>
§impl<'a, 'b> UnwindSafe for PositionMap<'a, 'b>
Blanket Implementations§
source§impl<T> From<T> for T
const: unstable · source§fn from(t: T) -> T
Returns the argument unchanged.
+}Fields§
§map: HashMap<i64, Vec<Markup<'a, 'b>>>
§arr: Vec<i64>
Implementations§
source§impl<'a, 'b> PositionMap<'a, 'b>
sourcefn insert_if_not_exists(&mut self, pos: i64, m: Markup<'a, 'b>)
Trait Implementations§
source§impl<'a, 'b> Default for PositionMap<'a, 'b>
source§fn default() -> PositionMap<'a, 'b>
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl<'a, 'b> RefUnwindSafe for PositionMap<'a, 'b>
§impl<'a, 'b> Send for PositionMap<'a, 'b>
§impl<'a, 'b> Sync for PositionMap<'a, 'b>
§impl<'a, 'b> Unpin for PositionMap<'a, 'b>
§impl<'a, 'b> UnwindSafe for PositionMap<'a, 'b>
Blanket Implementations§
source§impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
source§impl<T, U> Into<U> for Twhere
U: From<T>,
const: unstable · source§fn into(self) -> U
Calls U::from(self)
.
diff --git a/src/libmedium/post.rs.html b/src/libmedium/post.rs.html
index 5f3cbcf..312c2c4 100644
--- a/src/libmedium/post.rs.html
+++ b/src/libmedium/post.rs.html
@@ -424,6 +424,10 @@
424
425
426
+427
+428
+429
+430
/*
* Copyright (C) 2021 Aravinth Manivannan <realaravinth@batsense.net>
*
@@ -492,7 +496,7 @@
"<p>".into()
} else if p.type_ == "PRE" {
"<pre>".into()
- } else if p.type_ == "BQ" {
+ } else if p.type_ == "BQ" || p.type_ == "PQ" {
"<blockquote>".into()
} else if p.type_ == "H1" {
"<h1>".into()
@@ -559,8 +563,10 @@
state.in_oli = true;
"<ol><li>".into()
}
+ } else if p.type_ == "MIXTAPE_EMBED" {
+ "<div class='mixtape'><p>".into()
} else {
- log::info!("Unknown type");
+ log::info!("Unknown type: {}", p.type_);
r#"
<p class="libmedium__meta">
<b>From LibMedium:</b> LibMedium is built by reverse
@@ -594,7 +600,7 @@
"</p>".into()
} else if p.type_ == "PRE" {
"</pre>".into()
- } else if p.type_ == "BQ" {
+ } else if p.type_ == "BQ" || p.type_ == "PQ" {
"</blockquote>".into()
} else if p.type_ == "H1" {
"</h1>".into()
@@ -629,6 +635,8 @@
}
} else if p.type_ == "OLI" || p.type_ == "ULI" {
"</li>".into()
+ } else if p.type_ == "MIXTAPE_EMBED" {
+ "</p></div>".into()
} else {
"</span>".into()
};