brakeman 7.0.2 → 7.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (404) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +24 -0
  3. data/README.md +1 -1
  4. data/bundle/load.rb +10 -10
  5. data/bundle/ruby/3.1.0/gems/{csv-3.3.3 → csv-3.3.5}/NEWS.md +20 -1
  6. data/bundle/ruby/3.1.0/gems/{csv-3.3.3 → csv-3.3.5}/lib/csv/parser.rb +1 -1
  7. data/bundle/ruby/3.1.0/gems/{csv-3.3.3 → csv-3.3.5}/lib/csv/version.rb +1 -1
  8. data/bundle/ruby/3.1.0/gems/{haml-5.2.2 → haml-6.4.0}/CHANGELOG.md +180 -4
  9. data/bundle/ruby/3.1.0/gems/{haml-5.2.2 → haml-6.4.0}/FAQ.md +1 -1
  10. data/bundle/ruby/3.1.0/gems/haml-6.4.0/Gemfile +34 -0
  11. data/bundle/ruby/3.1.0/gems/{haml-5.2.2 → haml-6.4.0}/MIT-LICENSE +1 -1
  12. data/bundle/ruby/3.1.0/gems/{haml-5.2.2 → haml-6.4.0}/README.md +23 -34
  13. data/bundle/ruby/3.1.0/gems/{haml-5.2.2 → haml-6.4.0}/REFERENCE.md +100 -171
  14. data/bundle/ruby/3.1.0/gems/haml-6.4.0/exe/haml +6 -0
  15. data/bundle/ruby/3.1.0/gems/haml-6.4.0/haml.gemspec +45 -0
  16. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/ambles.rb +20 -0
  17. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/attribute_builder.rb +162 -0
  18. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/attribute_compiler.rb +133 -0
  19. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/attribute_parser.rb +116 -0
  20. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/cli.rb +154 -0
  21. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/compiler/children_compiler.rb +155 -0
  22. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/compiler/comment_compiler.rb +51 -0
  23. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/compiler/doctype_compiler.rb +52 -0
  24. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/compiler/script_compiler.rb +114 -0
  25. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/compiler/silent_script_compiler.rb +24 -0
  26. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/compiler/tag_compiler.rb +76 -0
  27. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/compiler.rb +97 -0
  28. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/dynamic_merger.rb +67 -0
  29. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/engine.rb +59 -0
  30. data/bundle/ruby/3.1.0/gems/{haml-5.2.2 → haml-6.4.0}/lib/haml/error.rb +5 -4
  31. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/escape.rb +13 -0
  32. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/escape_any.rb +21 -0
  33. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/base.rb +12 -0
  34. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/cdata.rb +20 -0
  35. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/coffee.rb +17 -0
  36. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/css.rb +33 -0
  37. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/erb.rb +10 -0
  38. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/escaped.rb +22 -0
  39. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/javascript.rb +33 -0
  40. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/less.rb +20 -0
  41. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/markdown.rb +11 -0
  42. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/plain.rb +29 -0
  43. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/preserve.rb +22 -0
  44. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/ruby.rb +10 -0
  45. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/sass.rb +15 -0
  46. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/scss.rb +15 -0
  47. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/text_base.rb +25 -0
  48. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/tilt_base.rb +59 -0
  49. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters.rb +75 -0
  50. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/force_escape.rb +29 -0
  51. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/helpers.rb +15 -0
  52. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/html.rb +22 -0
  53. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/identity.rb +13 -0
  54. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/object_ref.rb +35 -0
  55. data/bundle/ruby/3.1.0/gems/{haml-5.2.2 → haml-6.4.0}/lib/haml/parser.rb +159 -24
  56. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/rails_helpers.rb +53 -0
  57. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/rails_template.rb +62 -0
  58. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/railtie.rb +10 -0
  59. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/ruby_expression.rb +32 -0
  60. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/string_splitter.rb +140 -0
  61. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/template.rb +20 -0
  62. data/bundle/ruby/3.1.0/gems/{haml-5.2.2 → haml-6.4.0}/lib/haml/temple_line_counter.rb +2 -1
  63. data/bundle/ruby/3.1.0/gems/{haml-5.2.2 → haml-6.4.0}/lib/haml/util.rb +19 -15
  64. data/bundle/ruby/3.1.0/gems/{haml-5.2.2 → haml-6.4.0}/lib/haml/version.rb +1 -2
  65. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/whitespace.rb +8 -0
  66. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml.rb +13 -0
  67. data/bundle/ruby/3.1.0/gems/parallel-1.27.0/lib/parallel/version.rb +4 -0
  68. data/bundle/ruby/3.1.0/gems/{parallel-1.26.3 → parallel-1.27.0}/lib/parallel.rb +1 -1
  69. data/bundle/ruby/3.1.0/gems/{reline-0.6.1 → reline-0.6.2}/lib/reline/config.rb +5 -0
  70. data/bundle/ruby/3.1.0/gems/{reline-0.6.1 → reline-0.6.2}/lib/reline/io/ansi.rb +7 -3
  71. data/bundle/ruby/3.1.0/gems/{reline-0.6.1 → reline-0.6.2}/lib/reline/io.rb +2 -2
  72. data/bundle/ruby/3.1.0/gems/{reline-0.6.1 → reline-0.6.2}/lib/reline/key_actor/emacs.rb +2 -2
  73. data/bundle/ruby/3.1.0/gems/{reline-0.6.1 → reline-0.6.2}/lib/reline/line_editor.rb +10 -8
  74. data/bundle/ruby/3.1.0/gems/{reline-0.6.1 → reline-0.6.2}/lib/reline/unicode/east_asian_width.rb +7 -8
  75. data/bundle/ruby/3.1.0/gems/{reline-0.6.1 → reline-0.6.2}/lib/reline/unicode.rb +21 -15
  76. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/version.rb +3 -0
  77. data/bundle/ruby/3.1.0/gems/{reline-0.6.1 → reline-0.6.2}/lib/reline.rb +2 -3
  78. data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/NEWS.md +145 -1
  79. data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/attribute.rb +7 -8
  80. data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/cdata.rb +1 -1
  81. data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/child.rb +2 -3
  82. data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/comment.rb +1 -1
  83. data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/doctype.rb +3 -8
  84. data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/document.rb +21 -5
  85. data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/element.rb +53 -59
  86. data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/encoding.rb +3 -6
  87. data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/functions.rb +3 -3
  88. data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/instruction.rb +1 -1
  89. data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/namespace.rb +4 -4
  90. data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/node.rb +2 -2
  91. data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/parsers/baseparser.rb +143 -81
  92. data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/parsers/xpathparser.rb +4 -4
  93. data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/quickpath.rb +19 -18
  94. data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/rexml.rb +1 -1
  95. data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/security.rb +2 -2
  96. data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/source.rb +7 -2
  97. data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/text.rb +14 -17
  98. data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/validation/relaxng.rb +27 -26
  99. data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/validation/validation.rb +8 -8
  100. data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/xpath.rb +2 -13
  101. data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/xpath_parser.rb +44 -42
  102. data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.3 → sexp_processor-4.17.4}/History.rdoc +8 -0
  103. data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.3 → sexp_processor-4.17.4}/lib/pt_testcase.rb +1 -1
  104. data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.3 → sexp_processor-4.17.4}/lib/sexp_processor.rb +1 -1
  105. data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/CHANGES +4 -0
  106. data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/filters/encoding.rb +1 -1
  107. data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/version.rb +1 -1
  108. data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/template.rb +6 -1
  109. data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt.rb +1 -1
  110. data/bundle/ruby/3.1.0/gems/{unicode-display_width-3.1.4 → unicode-display_width-3.2.0}/CHANGELOG.md +8 -0
  111. data/bundle/ruby/3.1.0/gems/{unicode-display_width-3.1.4 → unicode-display_width-3.2.0}/README.md +5 -5
  112. data/bundle/ruby/3.1.0/gems/unicode-display_width-3.2.0/data/display_width.marshal.gz +0 -0
  113. data/bundle/ruby/3.1.0/gems/{unicode-display_width-3.1.4 → unicode-display_width-3.2.0}/lib/unicode/display_width/constants.rb +2 -2
  114. data/bundle/ruby/3.1.0/gems/{unicode-display_width-3.1.4 → unicode-display_width-3.2.0}/lib/unicode/display_width/emoji_support.rb +5 -2
  115. data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/CHANGELOG.md +5 -0
  116. data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/Gemfile.lock +1 -1
  117. data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/README.md +4 -4
  118. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/data/emoji.marshal.gz +0 -0
  119. data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/lib/unicode/emoji/constants.rb +3 -3
  120. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex.rb +8 -0
  121. data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/lib/unicode/emoji/generated/regex_basic.rb +1 -1
  122. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_include_mqe.rb +8 -0
  123. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_include_mqe_uqe.rb +8 -0
  124. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_include_text.rb +8 -0
  125. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_picto.rb +8 -0
  126. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_picto_no_emoji.rb +8 -0
  127. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_possible.rb +8 -0
  128. data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/lib/unicode/emoji/generated/regex_prop_emoji.rb +1 -1
  129. data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/lib/unicode/emoji/generated/regex_prop_presentation.rb +1 -1
  130. data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/lib/unicode/emoji/generated/regex_text.rb +1 -1
  131. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_valid.rb +8 -0
  132. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_valid_include_text.rb +8 -0
  133. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_well_formed.rb +8 -0
  134. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_well_formed_include_text.rb +8 -0
  135. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex.rb +8 -0
  136. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_include_mqe.rb +8 -0
  137. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_include_mqe_uqe.rb +8 -0
  138. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_include_text.rb +8 -0
  139. data/lib/brakeman/app_tree.rb +56 -9
  140. data/lib/brakeman/checks/base_check.rb +5 -2
  141. data/lib/brakeman/checks/check_eol_rails.rb +1 -0
  142. data/lib/brakeman/checks/check_eol_ruby.rb +1 -0
  143. data/lib/brakeman/checks/check_render.rb +5 -0
  144. data/lib/brakeman/checks/check_sql.rb +9 -2
  145. data/lib/brakeman/commandline.rb +5 -0
  146. data/lib/brakeman/file_path.rb +4 -0
  147. data/lib/brakeman/messages.rb +1 -1
  148. data/lib/brakeman/options.rb +4 -0
  149. data/lib/brakeman/parsers/haml6_embedded.rb +23 -0
  150. data/lib/brakeman/parsers/template_parser.rb +32 -7
  151. data/lib/brakeman/processor.rb +2 -0
  152. data/lib/brakeman/processors/alias_processor.rb +9 -0
  153. data/lib/brakeman/processors/base_processor.rb +2 -0
  154. data/lib/brakeman/processors/haml6_template_processor.rb +92 -0
  155. data/lib/brakeman/processors/haml_template_processor.rb +8 -2
  156. data/lib/brakeman/processors/lib/render_helper.rb +38 -1
  157. data/lib/brakeman/processors/template_processor.rb +1 -1
  158. data/lib/brakeman/report/pager.rb +1 -1
  159. data/lib/brakeman/report/report_html.rb +1 -1
  160. data/lib/brakeman/report/report_junit.rb +4 -57
  161. data/lib/brakeman/report/templates/header.html.erb +8 -3
  162. data/lib/brakeman/report/templates/ignored_warnings.html.erb +3 -3
  163. data/lib/brakeman/tracker.rb +6 -0
  164. data/lib/brakeman/version.rb +1 -1
  165. data/lib/brakeman.rb +4 -0
  166. metadata +327 -306
  167. data/bundle/ruby/3.1.0/gems/haml-5.2.2/Gemfile +0 -16
  168. data/bundle/ruby/3.1.0/gems/haml-5.2.2/TODO +0 -24
  169. data/bundle/ruby/3.1.0/gems/haml-5.2.2/haml.gemspec +0 -45
  170. data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/attribute_builder.rb +0 -219
  171. data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/attribute_compiler.rb +0 -237
  172. data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/attribute_parser.rb +0 -150
  173. data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/buffer.rb +0 -182
  174. data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/compiler.rb +0 -330
  175. data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/engine.rb +0 -238
  176. data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/escapable.rb +0 -77
  177. data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/exec.rb +0 -347
  178. data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/filters.rb +0 -399
  179. data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/generator.rb +0 -42
  180. data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/helpers/action_view_extensions.rb +0 -60
  181. data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/helpers/action_view_mods.rb +0 -132
  182. data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/helpers/action_view_xss_mods.rb +0 -60
  183. data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/helpers/safe_erubi_template.rb +0 -20
  184. data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/helpers/safe_erubis_template.rb +0 -33
  185. data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/helpers/xss_mods.rb +0 -114
  186. data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/helpers.rb +0 -709
  187. data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/options.rb +0 -273
  188. data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/plugin.rb +0 -54
  189. data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/railtie.rb +0 -53
  190. data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/sass_rails_filter.rb +0 -47
  191. data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/template/options.rb +0 -27
  192. data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/template.rb +0 -39
  193. data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml/temple_engine.rb +0 -124
  194. data/bundle/ruby/3.1.0/gems/haml-5.2.2/lib/haml.rb +0 -25
  195. data/bundle/ruby/3.1.0/gems/haml-5.2.2/yard/default/fulldoc/html/css/common.sass +0 -15
  196. data/bundle/ruby/3.1.0/gems/haml-5.2.2/yard/default/layout/html/footer.erb +0 -12
  197. data/bundle/ruby/3.1.0/gems/parallel-1.26.3/lib/parallel/version.rb +0 -4
  198. data/bundle/ruby/3.1.0/gems/reline-0.6.1/lib/reline/version.rb +0 -3
  199. data/bundle/ruby/3.1.0/gems/unicode-display_width-3.1.4/data/display_width.marshal.gz +0 -0
  200. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/data/emoji.marshal.gz +0 -0
  201. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex.rb +0 -8
  202. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_include_mqe.rb +0 -8
  203. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_include_mqe_uqe.rb +0 -8
  204. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_include_text.rb +0 -8
  205. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_picto.rb +0 -8
  206. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_picto_no_emoji.rb +0 -8
  207. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_possible.rb +0 -8
  208. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_valid.rb +0 -8
  209. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_valid_include_text.rb +0 -8
  210. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_well_formed.rb +0 -8
  211. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_well_formed_include_text.rb +0 -8
  212. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex.rb +0 -8
  213. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_include_mqe.rb +0 -8
  214. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_include_mqe_uqe.rb +0 -8
  215. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_include_text.rb +0 -8
  216. /data/bundle/ruby/3.1.0/gems/{csv-3.3.3 → csv-3.3.5}/LICENSE.txt +0 -0
  217. /data/bundle/ruby/3.1.0/gems/{csv-3.3.3 → csv-3.3.5}/README.md +0 -0
  218. /data/bundle/ruby/3.1.0/gems/{csv-3.3.3 → csv-3.3.5}/lib/csv/core_ext/array.rb +0 -0
  219. /data/bundle/ruby/3.1.0/gems/{csv-3.3.3 → csv-3.3.5}/lib/csv/core_ext/string.rb +0 -0
  220. /data/bundle/ruby/3.1.0/gems/{csv-3.3.3 → csv-3.3.5}/lib/csv/fields_converter.rb +0 -0
  221. /data/bundle/ruby/3.1.0/gems/{csv-3.3.3 → csv-3.3.5}/lib/csv/input_record_separator.rb +0 -0
  222. /data/bundle/ruby/3.1.0/gems/{csv-3.3.3 → csv-3.3.5}/lib/csv/row.rb +0 -0
  223. /data/bundle/ruby/3.1.0/gems/{csv-3.3.3 → csv-3.3.5}/lib/csv/table.rb +0 -0
  224. /data/bundle/ruby/3.1.0/gems/{csv-3.3.3 → csv-3.3.5}/lib/csv/writer.rb +0 -0
  225. /data/bundle/ruby/3.1.0/gems/{csv-3.3.3 → csv-3.3.5}/lib/csv.rb +0 -0
  226. /data/bundle/ruby/3.1.0/gems/{parallel-1.26.3 → parallel-1.27.0}/MIT-LICENSE.txt +0 -0
  227. /data/bundle/ruby/3.1.0/gems/{reline-0.6.1 → reline-0.6.2}/BSDL +0 -0
  228. /data/bundle/ruby/3.1.0/gems/{reline-0.6.1 → reline-0.6.2}/COPYING +0 -0
  229. /data/bundle/ruby/3.1.0/gems/{reline-0.6.1 → reline-0.6.2}/README.md +0 -0
  230. /data/bundle/ruby/3.1.0/gems/{reline-0.6.1 → reline-0.6.2}/lib/reline/face.rb +0 -0
  231. /data/bundle/ruby/3.1.0/gems/{reline-0.6.1 → reline-0.6.2}/lib/reline/history.rb +0 -0
  232. /data/bundle/ruby/3.1.0/gems/{reline-0.6.1 → reline-0.6.2}/lib/reline/io/dumb.rb +0 -0
  233. /data/bundle/ruby/3.1.0/gems/{reline-0.6.1 → reline-0.6.2}/lib/reline/io/windows.rb +0 -0
  234. /data/bundle/ruby/3.1.0/gems/{reline-0.6.1 → reline-0.6.2}/lib/reline/key_actor/base.rb +0 -0
  235. /data/bundle/ruby/3.1.0/gems/{reline-0.6.1 → reline-0.6.2}/lib/reline/key_actor/composite.rb +0 -0
  236. /data/bundle/ruby/3.1.0/gems/{reline-0.6.1 → reline-0.6.2}/lib/reline/key_actor/vi_command.rb +0 -0
  237. /data/bundle/ruby/3.1.0/gems/{reline-0.6.1 → reline-0.6.2}/lib/reline/key_actor/vi_insert.rb +0 -0
  238. /data/bundle/ruby/3.1.0/gems/{reline-0.6.1 → reline-0.6.2}/lib/reline/key_actor.rb +0 -0
  239. /data/bundle/ruby/3.1.0/gems/{reline-0.6.1 → reline-0.6.2}/lib/reline/key_stroke.rb +0 -0
  240. /data/bundle/ruby/3.1.0/gems/{reline-0.6.1 → reline-0.6.2}/lib/reline/kill_ring.rb +0 -0
  241. /data/bundle/ruby/3.1.0/gems/{reline-0.6.1 → reline-0.6.2}/license_of_rb-readline +0 -0
  242. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/LICENSE.txt +0 -0
  243. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/README.md +0 -0
  244. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/attlistdecl.rb +0 -0
  245. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/dtd/attlistdecl.rb +0 -0
  246. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/dtd/dtd.rb +0 -0
  247. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/dtd/elementdecl.rb +0 -0
  248. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/dtd/entitydecl.rb +0 -0
  249. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/dtd/notationdecl.rb +0 -0
  250. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/entity.rb +0 -0
  251. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/formatters/default.rb +0 -0
  252. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/formatters/pretty.rb +0 -0
  253. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/formatters/transitive.rb +0 -0
  254. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/light/node.rb +0 -0
  255. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/output.rb +0 -0
  256. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/parent.rb +0 -0
  257. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/parseexception.rb +0 -0
  258. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/parsers/lightparser.rb +0 -0
  259. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/parsers/pullparser.rb +0 -0
  260. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/parsers/sax2parser.rb +0 -0
  261. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/parsers/streamparser.rb +0 -0
  262. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/parsers/treeparser.rb +0 -0
  263. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/parsers/ultralightparser.rb +0 -0
  264. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/sax2listener.rb +0 -0
  265. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/streamlistener.rb +0 -0
  266. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/undefinednamespaceexception.rb +0 -0
  267. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/validation/validationexception.rb +0 -0
  268. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/xmldecl.rb +0 -0
  269. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml/xmltokens.rb +0 -0
  270. /data/bundle/ruby/3.1.0/gems/{rexml-3.4.1 → rexml-3.4.4}/lib/rexml.rb +0 -0
  271. /data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.3 → sexp_processor-4.17.4}/Manifest.txt +0 -0
  272. /data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.3 → sexp_processor-4.17.4}/README.rdoc +0 -0
  273. /data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.3 → sexp_processor-4.17.4}/lib/composite_sexp_processor.rb +0 -0
  274. /data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.3 → sexp_processor-4.17.4}/lib/sexp.rb +0 -0
  275. /data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.3 → sexp_processor-4.17.4}/lib/sexp_matcher.rb +0 -0
  276. /data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.3 → sexp_processor-4.17.4}/lib/strict_sexp.rb +0 -0
  277. /data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.3 → sexp_processor-4.17.4}/lib/unique.rb +0 -0
  278. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/EXPRESSIONS.md +0 -0
  279. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/Gemfile +0 -0
  280. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/LICENSE +0 -0
  281. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/README.md +0 -0
  282. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/engine.rb +0 -0
  283. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/erb/engine.rb +0 -0
  284. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/erb/parser.rb +0 -0
  285. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/erb/template.rb +0 -0
  286. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/erb/trimming.rb +0 -0
  287. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/exceptions.rb +0 -0
  288. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/filter.rb +0 -0
  289. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/filters/ambles.rb +0 -0
  290. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/filters/code_merger.rb +0 -0
  291. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/filters/control_flow.rb +0 -0
  292. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/filters/dynamic_inliner.rb +0 -0
  293. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/filters/dynamic_merger.rb +0 -0
  294. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/filters/eraser.rb +0 -0
  295. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/filters/escapable.rb +0 -0
  296. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/filters/multi_flattener.rb +0 -0
  297. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/filters/remove_bom.rb +0 -0
  298. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/filters/static_analyzer.rb +0 -0
  299. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/filters/static_merger.rb +0 -0
  300. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/filters/string_splitter.rb +0 -0
  301. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/filters/validator.rb +0 -0
  302. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/generator.rb +0 -0
  303. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/generators/array.rb +0 -0
  304. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/generators/array_buffer.rb +0 -0
  305. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/generators/erb.rb +0 -0
  306. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/generators/rails_output_buffer.rb +0 -0
  307. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/generators/string_buffer.rb +0 -0
  308. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/grammar.rb +0 -0
  309. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/html/attribute_merger.rb +0 -0
  310. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/html/attribute_remover.rb +0 -0
  311. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/html/attribute_sorter.rb +0 -0
  312. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/html/dispatcher.rb +0 -0
  313. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/html/fast.rb +0 -0
  314. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/html/filter.rb +0 -0
  315. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/html/pretty.rb +0 -0
  316. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/html/safe.rb +0 -0
  317. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/map.rb +0 -0
  318. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/mixins/dispatcher.rb +0 -0
  319. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/mixins/engine_dsl.rb +0 -0
  320. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/mixins/grammar_dsl.rb +0 -0
  321. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/mixins/options.rb +0 -0
  322. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/mixins/template.rb +0 -0
  323. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/parser.rb +0 -0
  324. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/static_analyzer.rb +0 -0
  325. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/templates/rails.rb +0 -0
  326. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/templates/tilt.rb +0 -0
  327. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/templates.rb +0 -0
  328. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple/utils.rb +0 -0
  329. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/lib/temple.rb +0 -0
  330. /data/bundle/ruby/3.1.0/gems/{temple-0.10.3 → temple-0.10.4}/temple.gemspec +0 -0
  331. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/COPYING +0 -0
  332. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/_emacs_org.rb +0 -0
  333. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/_handlebars.rb +0 -0
  334. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/_jbuilder.rb +0 -0
  335. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/_org.rb +0 -0
  336. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/asciidoc.rb +0 -0
  337. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/babel.rb +0 -0
  338. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/builder.rb +0 -0
  339. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/cli.rb +0 -0
  340. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/coffee.rb +0 -0
  341. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/commonmarker.rb +0 -0
  342. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/creole.rb +0 -0
  343. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/csv.rb +0 -0
  344. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/erb.rb +0 -0
  345. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/erubi.rb +0 -0
  346. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/etanni.rb +0 -0
  347. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/haml.rb +0 -0
  348. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/kramdown.rb +0 -0
  349. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/liquid.rb +0 -0
  350. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/livescript.rb +0 -0
  351. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/mapping.rb +0 -0
  352. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/markaby.rb +0 -0
  353. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/nokogiri.rb +0 -0
  354. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/pandoc.rb +0 -0
  355. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/pipeline.rb +0 -0
  356. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/plain.rb +0 -0
  357. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/prawn.rb +0 -0
  358. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/radius.rb +0 -0
  359. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/rdiscount.rb +0 -0
  360. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/rdoc.rb +0 -0
  361. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/redcarpet.rb +0 -0
  362. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/redcloth.rb +0 -0
  363. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/rst-pandoc.rb +0 -0
  364. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/sass.rb +0 -0
  365. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/slim.rb +0 -0
  366. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/string.rb +0 -0
  367. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/typescript.rb +0 -0
  368. /data/bundle/ruby/3.1.0/gems/{tilt-2.6.0 → tilt-2.6.1}/lib/tilt/yajl.rb +0 -0
  369. /data/bundle/ruby/3.1.0/gems/{unicode-display_width-3.1.4 → unicode-display_width-3.2.0}/MIT-LICENSE.txt +0 -0
  370. /data/bundle/ruby/3.1.0/gems/{unicode-display_width-3.1.4 → unicode-display_width-3.2.0}/lib/unicode/display_width/index.rb +0 -0
  371. /data/bundle/ruby/3.1.0/gems/{unicode-display_width-3.1.4 → unicode-display_width-3.2.0}/lib/unicode/display_width/no_string_ext.rb +0 -0
  372. /data/bundle/ruby/3.1.0/gems/{unicode-display_width-3.1.4 → unicode-display_width-3.2.0}/lib/unicode/display_width/reline_ext.rb +0 -0
  373. /data/bundle/ruby/3.1.0/gems/{unicode-display_width-3.1.4 → unicode-display_width-3.2.0}/lib/unicode/display_width/string_ext.rb +0 -0
  374. /data/bundle/ruby/3.1.0/gems/{unicode-display_width-3.1.4 → unicode-display_width-3.2.0}/lib/unicode/display_width.rb +0 -0
  375. /data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/CODE_OF_CONDUCT.md +0 -0
  376. /data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/Gemfile +0 -0
  377. /data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/MIT-LICENSE.txt +0 -0
  378. /data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/data/generate_constants.rb +0 -0
  379. /data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/lib/unicode/emoji/generated/regex_emoji_keycap.rb +0 -0
  380. /data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/lib/unicode/emoji/generated/regex_prop_component.rb +0 -0
  381. /data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/lib/unicode/emoji/generated/regex_prop_modifier.rb +0 -0
  382. /data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/lib/unicode/emoji/generated/regex_prop_modifier_base.rb +0 -0
  383. /data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/lib/unicode/emoji/generated/regex_text_presentation.rb +0 -0
  384. /data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/lib/unicode/emoji/generated_native/regex_basic.rb +0 -0
  385. /data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/lib/unicode/emoji/generated_native/regex_emoji_keycap.rb +0 -0
  386. /data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/lib/unicode/emoji/generated_native/regex_picto.rb +0 -0
  387. /data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/lib/unicode/emoji/generated_native/regex_picto_no_emoji.rb +0 -0
  388. /data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/lib/unicode/emoji/generated_native/regex_possible.rb +0 -0
  389. /data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/lib/unicode/emoji/generated_native/regex_prop_component.rb +0 -0
  390. /data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/lib/unicode/emoji/generated_native/regex_prop_emoji.rb +0 -0
  391. /data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/lib/unicode/emoji/generated_native/regex_prop_modifier.rb +0 -0
  392. /data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/lib/unicode/emoji/generated_native/regex_prop_modifier_base.rb +0 -0
  393. /data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/lib/unicode/emoji/generated_native/regex_prop_presentation.rb +0 -0
  394. /data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/lib/unicode/emoji/generated_native/regex_text.rb +0 -0
  395. /data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/lib/unicode/emoji/generated_native/regex_text_presentation.rb +0 -0
  396. /data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/lib/unicode/emoji/generated_native/regex_valid.rb +0 -0
  397. /data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/lib/unicode/emoji/generated_native/regex_valid_include_text.rb +0 -0
  398. /data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/lib/unicode/emoji/generated_native/regex_well_formed.rb +0 -0
  399. /data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/lib/unicode/emoji/generated_native/regex_well_formed_include_text.rb +0 -0
  400. /data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/lib/unicode/emoji/index.rb +0 -0
  401. /data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/lib/unicode/emoji/lazy_constants.rb +0 -0
  402. /data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/lib/unicode/emoji/list.rb +0 -0
  403. /data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/lib/unicode/emoji.rb +0 -0
  404. /data/bundle/ruby/3.1.0/gems/{unicode-emoji-4.0.4 → unicode-emoji-4.1.0}/unicode-emoji.gemspec +0 -0
@@ -0,0 +1,133 @@
1
+ # frozen_string_literal: true
2
+ require 'haml/attribute_builder'
3
+ require 'haml/attribute_parser'
4
+ require 'haml/ruby_expression'
5
+
6
+ module Haml
7
+ # The list of boolean attributes. You may add custom attributes to this constant.
8
+ BOOLEAN_ATTRIBUTES = %w[disabled readonly multiple checked autobuffer
9
+ autoplay controls loop selected hidden scoped async
10
+ defer reversed ismap seamless muted required
11
+ autofocus novalidate formnovalidate open pubdate
12
+ itemscope allowfullscreen default inert sortable
13
+ truespeed typemustmatch download]
14
+
15
+ class AttributeCompiler
16
+ def initialize(identity, options)
17
+ @identity = identity
18
+ @quote = options[:attr_quote]
19
+ @format = options[:format]
20
+ @escape_attrs = options[:escape_attrs]
21
+ end
22
+
23
+ def compile(node)
24
+ hashes = []
25
+ if node.value[:object_ref] != :nil || !AttributeParser.available?
26
+ return runtime_compile(node)
27
+ end
28
+ [node.value[:dynamic_attributes].new, node.value[:dynamic_attributes].old].compact.each do |attribute_str|
29
+ hash = AttributeParser.parse(attribute_str)
30
+ return runtime_compile(node) if hash.nil? || hash.any? { |_key, value| value.empty? }
31
+ hashes << hash
32
+ end
33
+ static_compile(node.value[:attributes], hashes)
34
+ end
35
+
36
+ private
37
+
38
+ def runtime_compile(node)
39
+ attrs = []
40
+ attrs.unshift(node.value[:attributes].inspect) if node.value[:attributes] != {}
41
+
42
+ args = [@escape_attrs.inspect, "#{@quote.inspect}.freeze", @format.inspect, node.value[:object_ref]] + attrs
43
+ [:html, :attrs, [:dynamic, "::Haml::AttributeBuilder.build(#{args.join(', ')}, #{node.value[:dynamic_attributes].to_literal})"]]
44
+ end
45
+
46
+ def static_compile(static_hash, dynamic_hashes)
47
+ temple = [:html, :attrs]
48
+ keys = [*static_hash.keys, *dynamic_hashes.map(&:keys).flatten].uniq.sort
49
+ keys.each do |key|
50
+ values = [[:static, static_hash[key]], *dynamic_hashes.map { |h| [:dynamic, h[key]] }]
51
+ values.select! { |_, exp| exp != nil }
52
+
53
+ case key
54
+ when 'id'
55
+ compile_id!(temple, key, values)
56
+ when 'class'
57
+ compile_class!(temple, key, values)
58
+ when 'data', 'aria'
59
+ compile_data!(temple, key, values)
60
+ when *BOOLEAN_ATTRIBUTES, /\Adata-/, /\Aaria-/
61
+ compile_boolean!(temple, key, values)
62
+ else
63
+ compile_common!(temple, key, values)
64
+ end
65
+ end
66
+ temple
67
+ end
68
+
69
+ def compile_id!(temple, key, values)
70
+ build_code = attribute_builder(:id, values)
71
+ if values.all? { |type, exp| type == :static || Temple::StaticAnalyzer.static?(exp) }
72
+ temple << [:html, :attr, key, [:static, eval(build_code).to_s]]
73
+ else
74
+ temple << [:html, :attr, key, [:dynamic, build_code]]
75
+ end
76
+ end
77
+
78
+ def compile_class!(temple, key, values)
79
+ build_code = attribute_builder(:class, values)
80
+ if values.all? { |type, exp| type == :static || Temple::StaticAnalyzer.static?(exp) }
81
+ temple << [:html, :attr, key, [:static, eval(build_code).to_s]]
82
+ else
83
+ temple << [:html, :attr, key, [:dynamic, build_code]]
84
+ end
85
+ end
86
+
87
+ def compile_data!(temple, key, values)
88
+ args = [@escape_attrs.inspect, "#{@quote.inspect}.freeze", values.map { |v| literal_for(v) }]
89
+ build_code = "::Haml::AttributeBuilder.build_#{key}(#{args.join(', ')})"
90
+
91
+ if values.all? { |type, exp| type == :static || Temple::StaticAnalyzer.static?(exp) }
92
+ temple << [:static, eval(build_code).to_s]
93
+ else
94
+ temple << [:dynamic, build_code]
95
+ end
96
+ end
97
+
98
+ def compile_boolean!(temple, key, values)
99
+ exp = literal_for(values.last)
100
+
101
+ if values.last.first == :static || Temple::StaticAnalyzer.static?(exp)
102
+ value = eval(exp)
103
+ case value
104
+ when true then temple << [:html, :attr, key, @format == :xhtml ? [:static, key] : [:multi]]
105
+ when false, nil
106
+ else temple << [:html, :attr, key, [:fescape, @escape_attrs, [:static, value.to_s]]]
107
+ end
108
+ else
109
+ var = @identity.generate
110
+ temple << [
111
+ :case, "(#{var} = (#{exp}))",
112
+ ['true', [:html, :attr, key, @format == :xhtml ? [:static, key] : [:multi]]],
113
+ ['false, nil', [:multi]],
114
+ [:else, [:multi, [:static, " #{key}=#{@quote}"], [:fescape, @escape_attrs, [:dynamic, var]], [:static, @quote]]],
115
+ ]
116
+ end
117
+ end
118
+
119
+ def compile_common!(temple, key, values)
120
+ temple << [:html, :attr, key, [:fescape, @escape_attrs, values.last]]
121
+ end
122
+
123
+ def attribute_builder(type, values)
124
+ args = [@escape_attrs.inspect, *values.map { |v| literal_for(v) }]
125
+ "::Haml::AttributeBuilder.build_#{type}(#{args.join(', ')})"
126
+ end
127
+
128
+ def literal_for(value)
129
+ type, exp = value
130
+ type == :static ? "#{exp.inspect}.freeze" : exp
131
+ end
132
+ end
133
+ end
@@ -0,0 +1,116 @@
1
+ # frozen_string_literal: true
2
+ require 'haml/ruby_expression'
3
+
4
+ module Haml
5
+ class AttributeParser
6
+ class ParseSkip < StandardError
7
+ end
8
+
9
+ # @return [TrueClass, FalseClass] - return true if AttributeParser.parse can be used.
10
+ def self.available?
11
+ # TruffleRuby doesn't have Ripper.lex
12
+ defined?(Ripper) && Ripper.respond_to?(:lex) && Temple::StaticAnalyzer.available?
13
+ end
14
+
15
+ def self.parse(text)
16
+ self.new.parse(text)
17
+ end
18
+
19
+ def parse(text)
20
+ exp = wrap_bracket(text)
21
+ return if Temple::StaticAnalyzer.syntax_error?(exp)
22
+
23
+ hash = {}
24
+ tokens = Ripper.lex(exp)[1..-2] || []
25
+ each_attr(tokens) do |attr_tokens|
26
+ key = parse_key!(attr_tokens)
27
+ hash[key] = attr_tokens.map { |t| t[2] }.join.strip
28
+ end
29
+ hash
30
+ rescue ParseSkip
31
+ nil
32
+ end
33
+
34
+ private
35
+
36
+ def wrap_bracket(text)
37
+ text = text.strip
38
+ return text if text[0] == '{'
39
+ "{#{text}}"
40
+ end
41
+
42
+ def parse_key!(tokens)
43
+ _, type, str = tokens.shift
44
+ case type
45
+ when :on_sp
46
+ parse_key!(tokens)
47
+ when :on_label
48
+ str.tr(':', '')
49
+ when :on_symbeg
50
+ _, _, key = tokens.shift
51
+ assert_type!(tokens.shift, :on_tstring_end) if str != ':'
52
+ skip_until_hash_rocket!(tokens)
53
+ key
54
+ when :on_tstring_beg
55
+ _, _, key = tokens.shift
56
+ next_token = tokens.shift
57
+ unless next_token[1] == :on_label_end
58
+ assert_type!(next_token, :on_tstring_end)
59
+ skip_until_hash_rocket!(tokens)
60
+ end
61
+ key
62
+ else
63
+ raise ParseSkip
64
+ end
65
+ end
66
+
67
+ def assert_type!(token, type)
68
+ raise ParseSkip if token[1] != type
69
+ end
70
+
71
+ def skip_until_hash_rocket!(tokens)
72
+ until tokens.empty?
73
+ _, type, str = tokens.shift
74
+ break if type == :on_op && str == '=>'
75
+ end
76
+ end
77
+
78
+ def each_attr(tokens)
79
+ attr_tokens = []
80
+ open_tokens = Hash.new { |h, k| h[k] = 0 }
81
+
82
+ tokens.each do |token|
83
+ _, type, _ = token
84
+ case type
85
+ when :on_comma
86
+ if open_tokens.values.all?(&:zero?)
87
+ yield(attr_tokens)
88
+ attr_tokens = []
89
+ next
90
+ end
91
+ when :on_lbracket
92
+ open_tokens[:array] += 1
93
+ when :on_rbracket
94
+ open_tokens[:array] -= 1
95
+ when :on_lbrace
96
+ open_tokens[:block] += 1
97
+ when :on_rbrace
98
+ open_tokens[:block] -= 1
99
+ when :on_lparen
100
+ open_tokens[:paren] += 1
101
+ when :on_rparen
102
+ open_tokens[:paren] -= 1
103
+ when :on_embexpr_beg
104
+ open_tokens[:embexpr] += 1
105
+ when :on_embexpr_end
106
+ open_tokens[:embexpr] -= 1
107
+ when :on_sp
108
+ next if attr_tokens.empty?
109
+ end
110
+
111
+ attr_tokens << token
112
+ end
113
+ yield(attr_tokens) unless attr_tokens.empty?
114
+ end
115
+ end
116
+ end
@@ -0,0 +1,154 @@
1
+ # frozen_string_literal: true
2
+ require 'haml'
3
+ require 'thor'
4
+
5
+ module Haml
6
+ class CLI < Thor
7
+ class_option :escape_html, type: :boolean, default: true
8
+ class_option :escape_attrs, type: :boolean, default: true
9
+
10
+ desc 'render HAML', 'Render haml template'
11
+ option :load_path, type: :string, aliases: %w[-I]
12
+ option :require, type: :string, aliases: %w[-r]
13
+ def render(file)
14
+ process_load_options
15
+ code = generate_code(file)
16
+ puts eval(code, binding, file)
17
+ end
18
+
19
+ desc 'compile HAML', 'Show compile result'
20
+ option :actionview, type: :boolean, default: false, aliases: %w[-a]
21
+ option :color, type: :boolean, default: true
22
+ option :check, type: :boolean, default: false, aliases: %w[-c]
23
+ def compile(file)
24
+ code = generate_code(file)
25
+ if options[:check]
26
+ if error = validate_ruby(code, file)
27
+ abort error.message.split("\n").first
28
+ end
29
+ puts "Syntax OK"
30
+ return
31
+ end
32
+ puts_code(code, color: options[:color])
33
+ end
34
+
35
+ desc 'temple HAML', 'Show temple intermediate expression'
36
+ option :color, type: :boolean, default: true
37
+ def temple(file)
38
+ pp_object(generate_temple(file), color: options[:color])
39
+ end
40
+
41
+ desc 'parse HAML', 'Show parse result'
42
+ option :color, type: :boolean, default: true
43
+ def parse(file)
44
+ pp_object(generate_ast(file), color: options[:color])
45
+ end
46
+
47
+ desc 'version', 'Show the used haml version'
48
+ def version
49
+ puts Haml::VERSION
50
+ end
51
+
52
+ private
53
+
54
+ def process_load_options
55
+ if options[:load_path]
56
+ options[:load_path].split(':').each do |dir|
57
+ $LOAD_PATH.unshift(dir) unless $LOAD_PATH.include?(dir)
58
+ end
59
+ end
60
+
61
+ if options[:require]
62
+ require options[:require]
63
+ end
64
+ end
65
+
66
+ def read_file(file)
67
+ if file == '-'
68
+ STDIN.read
69
+ else
70
+ File.read(file)
71
+ end
72
+ end
73
+
74
+ def generate_code(file)
75
+ template = read_file(file)
76
+ if options[:actionview]
77
+ require 'action_view'
78
+ require 'action_view/base'
79
+ require 'haml/rails_template'
80
+ handler = Haml::RailsTemplate.new
81
+ template = ActionView::Template.new(template, 'inline template', handler, { locals: [] })
82
+ code = handler.call(template)
83
+ <<-end_src
84
+ def _inline_template___2144273726781623612_70327218547300(local_assigns, output_buffer)
85
+ _old_virtual_path, @virtual_path = @virtual_path, nil;_old_output_buffer = @output_buffer;;#{code}
86
+ ensure
87
+ @virtual_path, @output_buffer = _old_virtual_path, _old_output_buffer
88
+ end
89
+ end_src
90
+ else
91
+ Haml::Engine.new(engine_options).call(template)
92
+ end
93
+ end
94
+
95
+ def generate_ast(file)
96
+ template = read_file(file)
97
+ Haml::Parser.new(engine_options).call(template)
98
+ end
99
+
100
+ def generate_temple(file)
101
+ ast = generate_ast(file)
102
+ Haml::Compiler.new(engine_options).call(ast)
103
+ end
104
+
105
+ def engine_options
106
+ Haml::Engine.options.to_h.merge(
107
+ escape_attrs: options[:escape_attrs],
108
+ escape_html: options[:escape_html],
109
+ )
110
+ end
111
+
112
+ # Flexible default_task, compatible with haml's CLI
113
+ def method_missing(*args)
114
+ return super(*args) if args.length > 1
115
+ render(args.first.to_s)
116
+ end
117
+
118
+ def puts_code(code, color: true)
119
+ begin
120
+ require 'irb/color'
121
+ rescue LoadError
122
+ color = false
123
+ end
124
+ if color
125
+ puts IRB::Color.colorize_code(code)
126
+ else
127
+ puts code
128
+ end
129
+ end
130
+
131
+ # Enable colored pretty printing only for development environment.
132
+ def pp_object(arg, color: true)
133
+ begin
134
+ require 'irb/color_printer'
135
+ rescue LoadError
136
+ color = false
137
+ end
138
+ if color
139
+ IRB::ColorPrinter.pp(arg)
140
+ else
141
+ require 'pp'
142
+ pp(arg)
143
+ end
144
+ end
145
+
146
+ def validate_ruby(code, file)
147
+ begin
148
+ eval("BEGIN {return nil}; #{code}", binding, file)
149
+ rescue ::SyntaxError # Not to be confused with Haml::SyntaxError
150
+ $!
151
+ end
152
+ end
153
+ end
154
+ end
@@ -0,0 +1,155 @@
1
+ # frozen_string_literal: true
2
+ require 'haml/temple_line_counter'
3
+
4
+ module Haml
5
+ class Compiler
6
+ class ChildrenCompiler
7
+ def initialize
8
+ @lineno = 1
9
+ @multi_flattener = Temple::Filters::MultiFlattener.new
10
+ end
11
+
12
+ def compile(node, &block)
13
+ temple = [:multi]
14
+ return temple if node.children.empty?
15
+
16
+ temple << [:whitespace] if prepend_whitespace?(node)
17
+ node.children.each do |n|
18
+ rstrip_whitespace!(temple) if nuke_prev_whitespace?(n)
19
+ insert_newlines!(temple, n)
20
+ temple << moving_lineno(n) { block.call(n) }
21
+ temple << [:whitespace] if insert_whitespace?(n)
22
+ end
23
+ rstrip_whitespace!(temple) if nuke_inner_whitespace?(node)
24
+ temple
25
+ end
26
+
27
+ private
28
+
29
+ def insert_newlines!(temple, node)
30
+ (node.line - @lineno).times do
31
+ temple << [:newline]
32
+ end
33
+
34
+ @lineno = node.line
35
+ end
36
+
37
+ def moving_lineno(node, &block)
38
+ # before: As they may have children, we need to increment lineno before compilation.
39
+ case node.type
40
+ when :script, :silent_script
41
+ @lineno += 1
42
+ when :tag
43
+ [node.value[:dynamic_attributes].new, node.value[:dynamic_attributes].old].compact.each do |attribute_hash|
44
+ @lineno += attribute_hash.count("\n")
45
+ end
46
+ @lineno += 1 if node.children.empty? && node.value[:parse]
47
+ end
48
+
49
+ temple = block.call # compile
50
+
51
+ # after: filter may not have children, and for some dynamic filters we can't predict the number of lines.
52
+ case node.type
53
+ when :filter
54
+ @lineno += TempleLineCounter.count_lines(temple)
55
+ end
56
+
57
+ temple
58
+ end
59
+
60
+ def prepend_whitespace?(node)
61
+ return false unless %i[comment tag].include?(node.type)
62
+ !nuke_inner_whitespace?(node)
63
+ end
64
+
65
+ def nuke_inner_whitespace?(node)
66
+ case
67
+ when node.type == :tag
68
+ node.value[:nuke_inner_whitespace]
69
+ when node.parent.nil?
70
+ false
71
+ else
72
+ nuke_inner_whitespace?(node.parent)
73
+ end
74
+ end
75
+
76
+ def nuke_prev_whitespace?(node)
77
+ case node.type
78
+ when :tag
79
+ node.value[:nuke_outer_whitespace]
80
+ when :silent_script
81
+ !node.children.empty? && nuke_prev_whitespace?(node.children.first)
82
+ else
83
+ false
84
+ end
85
+ end
86
+
87
+ def nuke_outer_whitespace?(node)
88
+ return false if node.type != :tag
89
+ node.value[:nuke_outer_whitespace]
90
+ end
91
+
92
+ def rstrip_whitespace!(temple)
93
+ return if temple.size == 1
94
+
95
+ case temple[0]
96
+ when :multi
97
+ case temple[-1][0]
98
+ when :whitespace
99
+ temple.delete_at(-1)
100
+ when :multi, :block
101
+ rstrip_whitespace!(temple[-1])
102
+ end
103
+ when :block
104
+ _block, code, exp = temple
105
+ if code.start_with?(/\s*if\s/)
106
+ # Remove [:whitespace] before `end`
107
+ exp.replace(@multi_flattener.call(exp))
108
+ rstrip_whitespace!(exp)
109
+
110
+ # Remove [:whitespace] before `else` if exists
111
+ else_index = find_else_index(exp)
112
+ if else_index
113
+ whitespace_index = else_index - 1
114
+ while exp[whitespace_index] == [:newline]
115
+ whitespace_index -= 1
116
+ end
117
+ if exp[whitespace_index] == [:whitespace]
118
+ exp.delete_at(whitespace_index)
119
+ end
120
+ end
121
+ end
122
+ end
123
+ end
124
+
125
+ def find_else_index(temple)
126
+ multi, *args = temple
127
+ return nil if multi != :multi
128
+
129
+ args.each_with_index do |arg, index|
130
+ if arg[0] == :code && arg[1].match?(/\A\s*else\s*\z/)
131
+ return index + 1
132
+ end
133
+ end
134
+ nil
135
+ end
136
+
137
+ def insert_whitespace?(node)
138
+ return false if nuke_outer_whitespace?(node)
139
+
140
+ case node.type
141
+ when :doctype
142
+ node.value[:type] != 'xml'
143
+ when :comment, :plain, :tag
144
+ true
145
+ when :script
146
+ node.children.empty? && !nuke_inner_whitespace?(node)
147
+ when :filter
148
+ !%w[ruby].include?(node.value[:name])
149
+ else
150
+ false
151
+ end
152
+ end
153
+ end
154
+ end
155
+ end
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+ module Haml
3
+ class Compiler
4
+ class CommentCompiler
5
+ def compile(node, &block)
6
+ if node.value[:conditional]
7
+ compile_conditional_comment(node, &block)
8
+ else
9
+ compile_html_comment(node, &block)
10
+ end
11
+ end
12
+
13
+ private
14
+
15
+ def compile_html_comment(node, &block)
16
+ if node.children.empty?
17
+ [:html, :comment, compile_text(node)]
18
+ else
19
+ [:html, :comment, yield(node)]
20
+ end
21
+ end
22
+
23
+ def compile_conditional_comment(node, &block)
24
+ condition = node.value[:conditional]
25
+ if node.value[:conditional] =~ /\A\[(\[*[^\[\]]+\]*)\]/
26
+ condition = $1
27
+ end
28
+
29
+ content =
30
+ if node.children.empty?
31
+ compile_text(node)
32
+ else
33
+ yield(node)
34
+ end
35
+ [:html, :condcomment, condition, content, node.value[:revealed]]
36
+ end
37
+
38
+ def compile_text(node)
39
+ text =
40
+ if node.value[:parse]
41
+ # Just always escaping the result for safety. We could respect
42
+ # escape_html, but I don't see any use case for it.
43
+ [:escape, true, [:dynamic, node.value[:text]]]
44
+ else
45
+ [:static, node.value[:text]]
46
+ end
47
+ [:multi, [:static, ' '], text, [:static, ' ']]
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+ module Haml
3
+ class Compiler
4
+ class DoctypeCompiler
5
+ def initialize(options = {})
6
+ @format = options[:format]
7
+ end
8
+
9
+ def compile(node)
10
+ case node.value[:type]
11
+ when ''
12
+ html_doctype(node)
13
+ when 'xml'
14
+ xml_doctype
15
+ when 'rdfa'
16
+ rdfa_doctype
17
+ else
18
+ [:html, :doctype, node.value[:type]]
19
+ end
20
+ end
21
+
22
+ private
23
+
24
+ def html_doctype(node)
25
+ version = node.value[:version] || :transitional
26
+ case @format
27
+ when :xhtml
28
+ [:html, :doctype, version]
29
+ when :html4
30
+ [:html, :doctype, :transitional]
31
+ when :html5
32
+ [:html, :doctype, :html]
33
+ else
34
+ [:html, :doctype, @format]
35
+ end
36
+ end
37
+
38
+ def xml_doctype
39
+ case @format
40
+ when :xhtml
41
+ [:static, "<?xml version='1.0' encoding='utf-8' ?>\n"]
42
+ else
43
+ [:multi]
44
+ end
45
+ end
46
+
47
+ def rdfa_doctype
48
+ [:static, '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">']
49
+ end
50
+ end
51
+ end
52
+ end