File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change 37
37
end
38
38
39
39
def android_xml_with_content ( content )
40
- # Under the hood, the code hardcodes the generated XML indentation as 4
41
- # spaces. Let's "force" it to be the same in here for consistency.
42
- #
43
- # See
44
- # https://github.com/wordpress-mobile/release-toolkit/blob/da405f2c5ca90d696857ba2ad01da2753daa60dc/lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_localize_helper.rb#L67
45
- default_indentation = ' ' * 4
46
-
47
40
# I couldn't find a way to interpolate a multiline string preserving its
48
41
# indentation in the heredoc below, so I hacked the following transformation
49
42
# of the input that adds the desired indentation to all lines.
50
- indented_content = content . chomp . lines . map { |l | "#{ default_indentation } #{ l } " } . join
43
+ #
44
+ # The desired indentation is 4 spaces to stay aligned with the production
45
+ # code applies when merging the XMLs.
46
+ indented_content = content . chomp . lines . map { |l | " #{ default_indentation } #{ l } " } . join
51
47
52
48
return <<~XML
53
49
<?xml version="1.0" encoding="UTF-8"?>
You can’t perform that action at this time.
0 commit comments