File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 1616# @param target
1717# Specifies the destination file of the fragment. Valid options: a string containing the path or title of the parent concat resource.
1818#
19+ # @param tag
20+ # Specifies a custom tag to use for the fragment.
21+ #
1922define concat::fragment (
2023 String $target ,
2124 Optional[Variant[Sensitive[String], String, Deferred]] $content = undef ,
2225 Optional[Variant[String, Array]] $source = undef ,
26+ Optional[String[1]] $tag = undef ,
2327 Variant[String, Integer] $order = ' 10' ,
2428) {
2529 $resource = ' Concat::Fragment'
3438 fail(" ${resource} ['${title} ']: Can't use 'source' and 'content' at the same time." )
3539 }
3640
37- $safe_target_name = regsubst($target , ' [\\\\ /:~\n\s\+\*\(\) @]' , ' _' , ' GM' )
41+ if $tag =~ Undef {
42+ $safe_target_name = regsubst($target , ' [\\\\ /:~\n\s\+\*\(\) @]' , ' _' , ' GM' )
43+ } else {
44+ $safe_target_name = $tag
45+ }
3846
3947 concat_fragment { $name:
4048 target => $target ,
You can’t perform that action at this time.
0 commit comments