File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
main/java/com/optum/templ
test/groovy/com/optum/templ Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ private String resolveTemplateFragment(String template) throws TemplException {
107107 StringBuilder sb = new StringBuilder ();
108108 sb .append (prefix );
109109 if (uppercase ) {
110- sb .append (result .toUpperCase ().replace ("-" ,"_" ));
110+ sb .append (result .toUpperCase ().replace ("-" ,"_" ). replace ( "." , "_" ) );
111111 } else if (lowercase ) {
112112 sb .append (result .toLowerCase ().replace ("_" ,"-" ));
113113 } else {
Original file line number Diff line number Diff line change @@ -192,7 +192,7 @@ class TemplEngineSpec extends Specification {
192192 def " Template Substitution Supports Uppercase Results" () {
193193 when :
194194 map. clear()
195- map. put(" ENV" , " dev-a_b" )
195+ map. put(" ENV" , " dev-a_b.c " )
196196 TemplEngine te = new TemplEngine (ds)
197197 String result = te. processTemplate(template)
198198
@@ -201,11 +201,11 @@ class TemplEngineSpec extends Specification {
201201
202202 where :
203203 template | expected
204- ' A{{^ENV}}Z' | ' ADEV_A_BZ '
205- ' A{{.^ENV}}Z' | ' A.DEV_A_BZ '
206- ' A{{.__^ENV}}Z' | ' A.__DEV_A_BZ '
207- ' A{{^ENV.}}Z' | ' ADEV_A_B .Z'
208- ' A{{.^ENV.}}Z' | ' A.DEV_A_B .Z'
204+ ' A{{^ENV}}Z' | ' ADEV_A_B_CZ '
205+ ' A{{.^ENV}}Z' | ' A.DEV_A_B_CZ '
206+ ' A{{.__^ENV}}Z' | ' A.__DEV_A_B_CZ '
207+ ' A{{^ENV.}}Z' | ' ADEV_A_B_C .Z'
208+ ' A{{.^ENV.}}Z' | ' A.DEV_A_B_C .Z'
209209 }
210210
211211 def " Template Substitution Supports Lowercase Results" () {
You can’t perform that action at this time.
0 commit comments