Skip to content

Commit

Permalink
chore: remove escaping from wry template
Browse files Browse the repository at this point in the history
  • Loading branch information
amrbashir committed Dec 26, 2022
1 parent 6873c1b commit 0d8c91c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
12 changes: 0 additions & 12 deletions src/templating/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,17 +176,6 @@ fn unprefix_path(
.map_err(Into::into)
}

fn java_escape_underscore(
helper: &Helper,
_: &Handlebars,
_: &Context,
_: &mut RenderContext,
out: &mut dyn Output,
) -> HelperResult {
out.write(&get_str(helper).replace("_", "_1"))
.map_err(Into::into)
}

fn dot_to_slash(
helper: &Helper,
_: &Handlebars,
Expand Down Expand Up @@ -227,7 +216,6 @@ pub fn init(config: Option<&Config>) -> Bicycle {
"reverse-domain-snake-case",
Box::new(reverse_domain_snake_case),
);
helpers.insert("java-escape-underscore", Box::new(java_escape_underscore));
helpers.insert("dot-to-slash", Box::new(dot_to_slash));
if config.is_some() {
// don't mix these up or very bad things will happen to all of us
Expand Down
2 changes: 1 addition & 1 deletion templates/apps/wry/src/lib.rs.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ fn _start_app() {
#[inline(never)]
pub extern "C" fn start_app() {
#[cfg(target_os = "android")]
android_binding!({{reverse-domain-snake-case app.domain}}, {{java-escape-underscore (snake-case app.name)}}, _start_app);
android_binding!({{reverse-domain-snake-case app.domain}}", "{{snake-case app.name}}", _start_app);
_start_app()
}

Expand Down

0 comments on commit 0d8c91c

Please sign in to comment.