Skip to content

Commit

Permalink
chore(templ): rename embeds
Browse files Browse the repository at this point in the history
  • Loading branch information
fiji-flo committed Dec 16, 2024
1 parent e547623 commit b5f064d
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::utils::dedup_whitespace;

#[allow(clippy::too_many_arguments)]
#[rari_f]
pub fn live_sample(
pub fn embed_live_sample(
id: String,
width: Option<AnyArg>,
height: Option<AnyArg>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use rari_utils::concat_strs;
use crate::error::DocError;
use crate::templ::api::RariApi;

#[allow(clippy::too_many_arguments)]
#[rari_f]
pub fn live_sample_link(id: String, display: String) -> Result<String, DocError> {
let id = RariApi::anchorize(&id);
Expand Down
12 changes: 6 additions & 6 deletions crates/rari-doc/src/templ/templs/embeds/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pub mod embedghlivesample;
pub mod embedinteractiveexample;
pub mod embedyoutube;
pub mod jsfiddleembed;
pub mod livesample;
pub mod livesamplelink;
pub mod embed_gh_live_sample;
pub mod embed_interactive_example;
pub mod embed_live_sample;
pub mod embed_youtube;
pub mod jsfiddle_embed;
pub mod live_sample_link;
14 changes: 8 additions & 6 deletions crates/rari-doc/src/templ/templs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,16 @@ pub fn invoke(
"next" => previous_menu_next::next_any,

// embeds
"embedinteractiveexample" => embeds::embedinteractiveexample::embed_interactive_example_any,
"embedghlivesample" => embeds::embedghlivesample::embed_gh_live_sample_any,
"embedlivesample" => embeds::livesample::live_sample_any,
"embedyoutube" => embeds::embedyoutube::embed_youtube_any,
"jsfiddleembed" => embeds::jsfiddleembed::embded_jsfiddle_any,
"embedinteractiveexample" => {
embeds::embed_interactive_example::embed_interactive_example_any
}
"embedghlivesample" => embeds::embed_gh_live_sample::embed_gh_live_sample_any,
"embedlivesample" => embeds::embed_live_sample::embed_live_sample_any,
"embedyoutube" => embeds::embed_youtube::embed_youtube_any,
"jsfiddleembed" => embeds::jsfiddle_embed::embded_jsfiddle_any,

// live sample link
"livesamplelink" => embeds::livesamplelink::live_sample_link_any,
"livesamplelink" => embeds::live_sample_link::live_sample_link_any,

// badges
"experimentalbadge" | "experimental_inline" => badges::experimental_any,
Expand Down

0 comments on commit b5f064d

Please sign in to comment.