Skip to content

Commit

Permalink
Merge pull request #129 from perryrh0dan/feat/template_meta
Browse files Browse the repository at this point in the history
fix(renderer): pascalcase transformation pipeline
  • Loading branch information
perryrh0dan authored Feb 13, 2021
2 parents 986eae1 + c9a223f commit 844b9e2
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
perf.data
perf.data.old
flamegraph.svg
flame.svg
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "tmpo"
description = "Command line utility to create new workspaces based on predefined templates"
version = "2.4.0"
version = "2.4.1"
authors = ["Thomas Pöhlmann <thomaspoehlmann96@googlemail.com>"]
edition = "2018"
license = "MIT"
Expand Down
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# What's new in Tmpo

## 2.4.1

### Fix

- Fix `PascalCase` transformation method.

## 2.4.0

### Feature
Expand Down
Empty file added flame.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/renderer/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ pub fn pascalcase_helper(
.param(0)
.ok_or(RenderError::new("Param 0 is required for format helper."))?;

let rendered = param.value().render().to_string().to_case(Case::Camel);
let rendered = param.value().render().to_string().to_case(Case::Pascal);
out.write(rendered.as_ref())?;
Ok(())
}
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ mod tests {

assert_eq!(
result,
"thomasPöhlmann,THOMAS_PÖHLMANN,thomas-pöhlmann,thomaspöhlmann,thomasPöhlmann,thomas_pöhlmann,THOMASPÖHLMANN"
"thomasPöhlmann,THOMAS_PÖHLMANN,thomas-pöhlmann,thomaspöhlmann,ThomasPöhlmann,thomas_pöhlmann,THOMASPÖHLMANN"
);

Ok(())
Expand Down

0 comments on commit 844b9e2

Please sign in to comment.