File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3737end
3838
3939def 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-
4740 # I couldn't find a way to interpolate a multiline string preserving its
4841 # indentation in the heredoc below, so I hacked the following transformation
4942 # 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
5147
5248 return <<~XML
5349 <?xml version="1.0" encoding="UTF-8"?>
You can’t perform that action at this time.
0 commit comments