brakeman 8.0.4 → 8.0.6
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.
- checksums.yaml +4 -4
- data/CHANGES.md +17 -0
- data/bundle/load.rb +6 -6
- data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/NEWS.md +39 -1
- data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/README.md +1 -1
- data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/lib/csv/parser.rb +7 -2
- data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/lib/csv/row.rb +26 -2
- data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/lib/csv/version.rb +1 -1
- data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/lib/csv.rb +30 -58
- data/bundle/ruby/3.2.0/gems/parallel-1.28.0/lib/parallel/version.rb +4 -0
- data/bundle/ruby/3.2.0/gems/{parallel-1.27.0 → parallel-1.28.0}/lib/parallel.rb +11 -0
- data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/io/ansi.rb +6 -4
- data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/io/windows.rb +49 -23
- data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/io.rb +8 -2
- data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/line_editor.rb +49 -21
- data/bundle/ruby/3.2.0/gems/reline-0.7.0/lib/reline/version.rb +3 -0
- data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline.rb +10 -9
- data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/CHANGES +8 -2
- data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/Gemfile +5 -2
- data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/LICENSE +1 -1
- data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/README.jp.md +10 -12
- data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/README.md +21 -26
- data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/embedded.rb +1 -1
- data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/logic_less/context.rb +4 -3
- data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/splat/builder.rb +18 -19
- data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/version.rb +1 -1
- data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/CHANGES +8 -0
- data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/README.md +1 -1
- data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/static_analyzer.rb +1 -1
- data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/string_splitter.rb +61 -5
- data/bundle/ruby/3.2.0/gems/temple-0.10.6/lib/temple/parser_engine.rb +34 -0
- data/bundle/ruby/3.2.0/gems/temple-0.10.6/lib/temple/static_analyzer.rb +148 -0
- data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/version.rb +1 -1
- data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/COPYING +1 -1
- data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/commonmarker.rb +24 -0
- data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/rdoc.rb +10 -2
- data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt.rb +1 -1
- data/lib/brakeman/checks/check_eol_rails.rb +2 -1
- data/lib/brakeman/checks/check_eol_ruby.rb +1 -0
- data/lib/brakeman/checks/check_execute.rb +23 -19
- data/lib/brakeman/checks/check_sql.rb +2 -2
- data/lib/brakeman/processors/base_processor.rb +13 -6
- data/lib/brakeman/processors/gem_processor.rb +1 -1
- data/lib/brakeman/processors/haml_template_processor.rb +3 -1
- data/lib/brakeman/processors/lib/render_helper.rb +3 -1
- data/lib/brakeman/scanner.rb +8 -2
- data/lib/brakeman/version.rb +1 -1
- data/lib/brakeman.rb +1 -1
- metadata +171 -170
- data/bundle/ruby/3.2.0/gems/parallel-1.27.0/lib/parallel/version.rb +0 -4
- data/bundle/ruby/3.2.0/gems/reline-0.6.3/lib/reline/version.rb +0 -3
- data/bundle/ruby/3.2.0/gems/temple-0.10.4/lib/temple/static_analyzer.rb +0 -78
- data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/LICENSE.txt +0 -0
- data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/lib/csv/core_ext/array.rb +0 -0
- data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/lib/csv/core_ext/string.rb +0 -0
- data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/lib/csv/fields_converter.rb +0 -0
- data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/lib/csv/input_record_separator.rb +0 -0
- data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/lib/csv/table.rb +0 -0
- data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/lib/csv/writer.rb +0 -0
- data/bundle/ruby/3.2.0/gems/{parallel-1.27.0 → parallel-1.28.0}/MIT-LICENSE.txt +0 -0
- data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/BSDL +0 -0
- data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/COPYING +0 -0
- data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/README.md +0 -0
- data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/config.rb +0 -0
- data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/face.rb +0 -0
- data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/history.rb +0 -0
- data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/io/dumb.rb +0 -0
- data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/key_actor/base.rb +0 -0
- data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/key_actor/composite.rb +0 -0
- data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/key_actor/emacs.rb +2 -2
- /data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/key_actor/vi_command.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/key_actor/vi_insert.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/key_actor.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/key_stroke.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/kill_ring.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/unicode/east_asian_width.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/unicode.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/license_of_rb-readline +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/code_attributes.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/command.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/controls.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/do_inserter.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/end_inserter.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/engine.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/erb_converter.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/filter.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/grammar.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/include.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/interpolation.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/logic_less/filter.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/logic_less.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/parser.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/railtie.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/smart/escaper.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/smart/filter.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/smart/parser.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/smart.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/splat/filter.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/template.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/translator.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/slim.gemspec +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/EXPRESSIONS.md +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/Gemfile +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/LICENSE +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/engine.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/erb/engine.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/erb/parser.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/erb/template.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/erb/trimming.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/exceptions.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filter.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/ambles.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/code_merger.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/control_flow.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/dynamic_inliner.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/dynamic_merger.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/encoding.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/eraser.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/escapable.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/multi_flattener.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/remove_bom.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/static_merger.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/validator.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/generator.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/generators/array.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/generators/array_buffer.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/generators/erb.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/generators/rails_output_buffer.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/generators/string_buffer.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/grammar.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/html/attribute_merger.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/html/attribute_remover.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/html/attribute_sorter.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/html/dispatcher.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/html/fast.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/html/filter.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/html/pretty.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/html/safe.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/map.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/mixins/dispatcher.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/mixins/engine_dsl.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/mixins/grammar_dsl.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/mixins/options.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/mixins/template.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/parser.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/templates/rails.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/templates/tilt.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/templates.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/utils.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/temple.gemspec +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/_emacs_org.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/_handlebars.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/_jbuilder.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/_org.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/asciidoc.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/babel.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/builder.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/cli.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/coffee.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/csv.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/erb.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/erubi.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/etanni.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/haml.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/kramdown.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/liquid.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/livescript.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/mapping.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/markaby.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/nokogiri.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/pandoc.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/pipeline.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/plain.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/prawn.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/radius.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/rdiscount.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/redcarpet.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/redcloth.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/rst-pandoc.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/sass.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/slim.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/string.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/template.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/typescript.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/yajl.rb +0 -0
|
@@ -13,6 +13,7 @@ class Reline::LineEditor
|
|
|
13
13
|
attr_accessor :prompt_proc
|
|
14
14
|
attr_accessor :auto_indent_proc
|
|
15
15
|
attr_accessor :dig_perfect_match_proc
|
|
16
|
+
attr_accessor :rprompt
|
|
16
17
|
|
|
17
18
|
VI_MOTIONS = %i{
|
|
18
19
|
ed_prev_char
|
|
@@ -43,7 +44,6 @@ class Reline::LineEditor
|
|
|
43
44
|
RenderedScreen = Struct.new(:base_y, :lines, :cursor_y, keyword_init: true)
|
|
44
45
|
|
|
45
46
|
CompletionJourneyState = Struct.new(:line_index, :pre, :target, :post, :list, :pointer)
|
|
46
|
-
NullActionState = [nil, nil].freeze
|
|
47
47
|
|
|
48
48
|
class MenuInfo
|
|
49
49
|
attr_reader :list
|
|
@@ -223,7 +223,7 @@ class Reline::LineEditor
|
|
|
223
223
|
|
|
224
224
|
def reset_variables(prompt = '')
|
|
225
225
|
@prompt = prompt.gsub("\n", "\\n")
|
|
226
|
-
@
|
|
226
|
+
@mark_position = nil
|
|
227
227
|
@is_multiline = false
|
|
228
228
|
@finished = false
|
|
229
229
|
@history_pointer = nil
|
|
@@ -253,8 +253,8 @@ class Reline::LineEditor
|
|
|
253
253
|
@undo_redo_history = [[[""], 0, 0]]
|
|
254
254
|
@undo_redo_index = 0
|
|
255
255
|
@restoring = false
|
|
256
|
-
@prev_action_state =
|
|
257
|
-
@next_action_state =
|
|
256
|
+
@prev_action_state = {}
|
|
257
|
+
@next_action_state = {}
|
|
258
258
|
reset_line
|
|
259
259
|
end
|
|
260
260
|
|
|
@@ -476,6 +476,20 @@ class Reline::LineEditor
|
|
|
476
476
|
prompt_width = Reline::Unicode.calculate_width(prompt, true)
|
|
477
477
|
[[0, prompt_width, prompt], [prompt_width, Reline::Unicode.calculate_width(line, true), line]]
|
|
478
478
|
end
|
|
479
|
+
|
|
480
|
+
# Add rprompt to the first visible line if set and there's room
|
|
481
|
+
if @rprompt && !@rprompt.empty? && new_lines[0]
|
|
482
|
+
rprompt_width = Reline::Unicode.calculate_width(@rprompt, true)
|
|
483
|
+
right_col = screen_width - rprompt_width
|
|
484
|
+
first_line = new_lines[0]
|
|
485
|
+
# Calculate the end of the current content (prompt + input)
|
|
486
|
+
content_end = first_line.sum { |_, width, _| width }
|
|
487
|
+
# Only show rprompt if there's at least 1 char gap between content and rprompt
|
|
488
|
+
if right_col > content_end
|
|
489
|
+
first_line << [right_col, rprompt_width, @rprompt]
|
|
490
|
+
end
|
|
491
|
+
end
|
|
492
|
+
|
|
479
493
|
if @menu_info
|
|
480
494
|
@menu_info.lines(screen_width).each do |item|
|
|
481
495
|
new_lines << [[0, Reline::Unicode.calculate_width(item), item]]
|
|
@@ -491,8 +505,8 @@ class Reline::LineEditor
|
|
|
491
505
|
next if row < 0 || row >= screen_height
|
|
492
506
|
|
|
493
507
|
dialog_rows = new_lines[row] ||= []
|
|
494
|
-
# index 0 is for prompt, index 1 is for line, index 2.. is for dialog
|
|
495
|
-
dialog_rows[index +
|
|
508
|
+
# index 0 is for prompt, index 1 is for line, index 2 is for rprompt, index 3.. is for dialog
|
|
509
|
+
dialog_rows[index + 3] = [x_range.begin, dialog.width, dialog.contents[row - y_range.begin]]
|
|
496
510
|
end
|
|
497
511
|
end
|
|
498
512
|
|
|
@@ -1022,7 +1036,7 @@ class Reline::LineEditor
|
|
|
1022
1036
|
@byte_pointer -= byte_size
|
|
1023
1037
|
end
|
|
1024
1038
|
|
|
1025
|
-
@prev_action_state, @next_action_state = @next_action_state,
|
|
1039
|
+
@prev_action_state, @next_action_state = @next_action_state, {}
|
|
1026
1040
|
|
|
1027
1041
|
unless @completion_occurs
|
|
1028
1042
|
@completion_state = CompletionState::NORMAL
|
|
@@ -1779,17 +1793,24 @@ class Reline::LineEditor
|
|
|
1779
1793
|
|
|
1780
1794
|
private def em_yank(key)
|
|
1781
1795
|
yanked = @kill_ring.yank
|
|
1782
|
-
|
|
1796
|
+
return unless yanked
|
|
1797
|
+
|
|
1798
|
+
before_cursor = current_line.byteslice(0, @byte_pointer)
|
|
1799
|
+
after_cursor = current_line.byteslice(@byte_pointer, current_line.bytesize)
|
|
1800
|
+
set_current_line(before_cursor + yanked + after_cursor, before_cursor.bytesize + yanked.bytesize)
|
|
1801
|
+
set_next_action_state(:em_yank_line, [before_cursor, after_cursor])
|
|
1783
1802
|
end
|
|
1784
1803
|
alias_method :yank, :em_yank
|
|
1785
1804
|
|
|
1786
1805
|
private def em_yank_pop(key)
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1806
|
+
before_cursor, after_cursor = prev_action_state_value(:em_yank_line)
|
|
1807
|
+
return unless before_cursor and after_cursor
|
|
1808
|
+
|
|
1809
|
+
yanked, = @kill_ring.yank_pop
|
|
1810
|
+
return unless yanked
|
|
1811
|
+
|
|
1812
|
+
set_current_line(before_cursor + yanked + after_cursor, before_cursor.bytesize + yanked.bytesize)
|
|
1813
|
+
set_next_action_state(:em_yank_line, [before_cursor, after_cursor])
|
|
1793
1814
|
end
|
|
1794
1815
|
alias_method :yank_pop, :em_yank_pop
|
|
1795
1816
|
|
|
@@ -2303,15 +2324,22 @@ class Reline::LineEditor
|
|
|
2303
2324
|
end
|
|
2304
2325
|
|
|
2305
2326
|
private def em_set_mark(key)
|
|
2306
|
-
|
|
2327
|
+
cursor_column = Reline::Unicode.calculate_width(current_line.byteslice(0, @byte_pointer))
|
|
2328
|
+
@mark_position = [@line_index, cursor_column]
|
|
2307
2329
|
end
|
|
2308
2330
|
alias_method :set_mark, :em_set_mark
|
|
2309
2331
|
|
|
2310
2332
|
private def em_exchange_mark(key)
|
|
2311
|
-
return unless @
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
@
|
|
2333
|
+
return unless @mark_position
|
|
2334
|
+
line_index, cursor_column = @mark_position
|
|
2335
|
+
em_set_mark(key)
|
|
2336
|
+
if @buffer_of_lines.size <= line_index
|
|
2337
|
+
@line_index = @buffer_of_lines.size - 1
|
|
2338
|
+
@byte_pointer = current_line.bytesize
|
|
2339
|
+
else
|
|
2340
|
+
@line_index = line_index
|
|
2341
|
+
calculate_nearest_cursor(cursor_column)
|
|
2342
|
+
end
|
|
2315
2343
|
end
|
|
2316
2344
|
alias_method :exchange_point_and_mark, :em_exchange_mark
|
|
2317
2345
|
|
|
@@ -2343,11 +2371,11 @@ class Reline::LineEditor
|
|
|
2343
2371
|
end
|
|
2344
2372
|
|
|
2345
2373
|
private def prev_action_state_value(type)
|
|
2346
|
-
@prev_action_state[
|
|
2374
|
+
@prev_action_state[type]
|
|
2347
2375
|
end
|
|
2348
2376
|
|
|
2349
2377
|
private def set_next_action_state(type, value)
|
|
2350
|
-
@next_action_state =
|
|
2378
|
+
@next_action_state[type] = value
|
|
2351
2379
|
end
|
|
2352
2380
|
|
|
2353
2381
|
private def re_read_init_file(_key)
|
|
@@ -247,19 +247,19 @@ module Reline
|
|
|
247
247
|
} # :nodoc:
|
|
248
248
|
Reline::DEFAULT_DIALOG_CONTEXT = Array.new # :nodoc:
|
|
249
249
|
|
|
250
|
-
def readmultiline(
|
|
250
|
+
def readmultiline(_prompt = '', _add_history = false, prompt: _prompt, add_history: _add_history, rprompt: nil, &confirm_multiline_termination)
|
|
251
251
|
@mutex.synchronize do
|
|
252
252
|
unless confirm_multiline_termination
|
|
253
253
|
raise ArgumentError.new('#readmultiline needs block to confirm multiline termination')
|
|
254
254
|
end
|
|
255
255
|
|
|
256
256
|
io_gate.with_raw_input do
|
|
257
|
-
inner_readline(prompt,
|
|
257
|
+
inner_readline(prompt, add_history, true, rprompt: rprompt, &confirm_multiline_termination)
|
|
258
258
|
end
|
|
259
259
|
|
|
260
260
|
whole_buffer = line_editor.whole_buffer.dup
|
|
261
261
|
whole_buffer.taint if RUBY_VERSION < '2.7'
|
|
262
|
-
if
|
|
262
|
+
if add_history and whole_buffer and whole_buffer.chomp("\n").size > 0
|
|
263
263
|
Reline::HISTORY << whole_buffer
|
|
264
264
|
end
|
|
265
265
|
|
|
@@ -273,15 +273,15 @@ module Reline
|
|
|
273
273
|
end
|
|
274
274
|
end
|
|
275
275
|
|
|
276
|
-
def readline(
|
|
276
|
+
def readline(_prompt = '', _add_history = false, prompt: _prompt, add_history: _add_history, rprompt: nil)
|
|
277
277
|
@mutex.synchronize do
|
|
278
278
|
io_gate.with_raw_input do
|
|
279
|
-
inner_readline(prompt,
|
|
279
|
+
inner_readline(prompt, add_history, false, rprompt: rprompt)
|
|
280
280
|
end
|
|
281
281
|
|
|
282
282
|
line = line_editor.line.dup
|
|
283
283
|
line.taint if RUBY_VERSION < '2.7'
|
|
284
|
-
if
|
|
284
|
+
if add_history and line and line.chomp("\n").size > 0
|
|
285
285
|
Reline::HISTORY << line.chomp("\n")
|
|
286
286
|
end
|
|
287
287
|
|
|
@@ -290,7 +290,7 @@ module Reline
|
|
|
290
290
|
end
|
|
291
291
|
end
|
|
292
292
|
|
|
293
|
-
private def inner_readline(prompt,
|
|
293
|
+
private def inner_readline(prompt, add_history, multiline, rprompt: nil, &confirm_multiline_termination)
|
|
294
294
|
if ENV['RELINE_STDERR_TTY']
|
|
295
295
|
if io_gate.win?
|
|
296
296
|
$stderr = File.open(ENV['RELINE_STDERR_TTY'], 'a')
|
|
@@ -323,6 +323,7 @@ module Reline
|
|
|
323
323
|
line_editor.prompt_proc = prompt_proc
|
|
324
324
|
line_editor.auto_indent_proc = auto_indent_proc
|
|
325
325
|
line_editor.dig_perfect_match_proc = dig_perfect_match_proc
|
|
326
|
+
line_editor.rprompt = rprompt&.encode(encoding)
|
|
326
327
|
|
|
327
328
|
pre_input_hook&.call
|
|
328
329
|
|
|
@@ -442,13 +443,13 @@ module Reline
|
|
|
442
443
|
##
|
|
443
444
|
# :singleton-method: readmultiline
|
|
444
445
|
# :call-seq:
|
|
445
|
-
# readmultiline(prompt = '',
|
|
446
|
+
# readmultiline(prompt = '', add_history = false, &confirm_multiline_termination) -> string or nil
|
|
446
447
|
def_single_delegators :core, :readmultiline
|
|
447
448
|
|
|
448
449
|
##
|
|
449
450
|
# :singleton-method: readline
|
|
450
451
|
# :call-seq:
|
|
451
|
-
# readline(prompt = '',
|
|
452
|
+
# readline(prompt = '', add_history = false) -> string or nil
|
|
452
453
|
def_single_delegators :core, :readline
|
|
453
454
|
def_single_delegators :core, :completion_case_fold, :completion_case_fold=
|
|
454
455
|
def_single_delegators :core, :completion_quote_character
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
5.2.2 (2026-07-24)
|
|
2
|
+
|
|
3
|
+
* Remove legacy less engine - #963
|
|
4
|
+
* Add asciidoc engine - #973
|
|
5
|
+
* Fix logic less condition for empty objects - #970
|
|
6
|
+
|
|
1
7
|
5.2.1 (2024-01-20)
|
|
2
8
|
|
|
3
9
|
* Support Ruby 3.3
|
|
@@ -33,11 +39,11 @@
|
|
|
33
39
|
* Remove deprecated syntax
|
|
34
40
|
* Add option to hyphenate underscore attributes - #852
|
|
35
41
|
* Update CI/CD testing and dependencies
|
|
36
|
-
|
|
42
|
+
|
|
37
43
|
4.1.0 (2020-05-07)
|
|
38
44
|
* Add support for Tailwind CSS - #841
|
|
39
45
|
* Update dependencies and testing
|
|
40
|
-
|
|
46
|
+
|
|
41
47
|
4.0.1 (2018-09-02)
|
|
42
48
|
|
|
43
49
|
* Fix incompatibility issue with Slim Include plugin and new ability to specifiy attributes for embedded engines #819
|
|
@@ -2,9 +2,12 @@ source 'https://rubygems.org/'
|
|
|
2
2
|
|
|
3
3
|
gemspec
|
|
4
4
|
|
|
5
|
+
gem 'logger', '~> 1.7'
|
|
6
|
+
gem 'ostruct', '~> 0.6'
|
|
5
7
|
gem 'minitest', '~> 5.15'
|
|
6
|
-
gem 'rake', '~> 13.
|
|
7
|
-
gem '
|
|
8
|
+
gem 'rake', '~> 13.3'
|
|
9
|
+
gem 'asciidoctor', '~> 2.0'
|
|
10
|
+
gem 'kramdown', '~> 2.5'
|
|
8
11
|
|
|
9
12
|
if ENV['TEMPLE'] && ENV['TEMPLE'] != 'master'
|
|
10
13
|
gem 'temple', "= #{ENV['TEMPLE']}"
|
|
@@ -566,7 +566,7 @@ div class="first second third"
|
|
|
566
566
|
|
|
567
567
|
~~~ slim
|
|
568
568
|
ruby:
|
|
569
|
-
def a_unless_current
|
|
569
|
+
def self.a_unless_current
|
|
570
570
|
@page_current ? {tag: 'span'} : {tag: 'a', href: 'https://slim-template.github.io/'}
|
|
571
571
|
end
|
|
572
572
|
- @page_current = true
|
|
@@ -866,8 +866,8 @@ p: markdown: Tag with **inline** markdown!
|
|
|
866
866
|
| css: | なし | ショートカット | css コードを埋め込み、style タグで囲む |
|
|
867
867
|
| sass: | sass-embedded または sassc または sass | コンパイル時 | sass コードを埋め込み、style タグで囲む |
|
|
868
868
|
| scss: | sass-embedded または sassc または sass | コンパイル時 | scss コードを埋め込み、style タグで囲む |
|
|
869
|
-
| less: | less | コンパイル時 | less コードを埋め込み、style タグで囲む |
|
|
870
869
|
| coffee: | coffee-script | コンパイル時 | CoffeeScript をコンパイルし、 script タグで囲む |
|
|
870
|
+
| asciidoc: | asciidoctor | コンパイル時 + 展開 | AsciiDoc をコンパイルし、テキスト中の # \{variables} を展開 |
|
|
871
871
|
| markdown: | redcarpet/rdiscount/kramdown | コンパイル時 + 展開 | Markdown をコンパイルし、テキスト中の # \{variables} を展開 |
|
|
872
872
|
| textile: | redcloth | コンパイル時 + 展開 | textile をコンパイルし、テキスト中の # \{variables} を展開 |
|
|
873
873
|
| rdoc: | rdoc | コンパイル時 + 展開 | RDoc をコンパイルし、テキスト中の # \{variables} を展開 |
|
|
@@ -883,7 +883,6 @@ Slim::Embedded.options[:markdown] = {auto_ids: false}
|
|
|
883
883
|
* Javascript
|
|
884
884
|
* CSS
|
|
885
885
|
* CoffeeScript
|
|
886
|
-
* LESS
|
|
887
886
|
* SASS
|
|
888
887
|
* SCSS
|
|
889
888
|
|
|
@@ -1160,7 +1159,6 @@ markdown:
|
|
|
1160
1159
|
* [Textmate / Sublime Text](https://github.com/slim-template/ruby-slim.tmbundle)
|
|
1161
1160
|
* [Espresso text editor](https://github.com/slim-template/Slim-Sugar)
|
|
1162
1161
|
* [Coda](https://github.com/slim-template/Coda-2-Slim.mode)
|
|
1163
|
-
* [Atom](https://github.com/slim-template/language-slim)
|
|
1164
1162
|
|
|
1165
1163
|
### テンプレート変換 (HAML, ERB, ...)
|
|
1166
1164
|
|
|
@@ -1244,7 +1242,6 @@ Slim は [MIT license](http://www.opensource.org/licenses/MIT) に基づいて
|
|
|
1244
1242
|
* [Textmate / Sublime Text](https://github.com/slim-template/ruby-slim.tmbundle)
|
|
1245
1243
|
* [Espresso text editor](https://github.com/slim-template/Slim-Sugar)
|
|
1246
1244
|
* [Coda](https://github.com/slim-template/Coda-2-Slim.mode)
|
|
1247
|
-
* [Atom](https://github.com/slim-template/language-slim)
|
|
1248
1245
|
|
|
1249
1246
|
静的コード解析:
|
|
1250
1247
|
|
|
@@ -1259,18 +1256,19 @@ Slim は [MIT license](http://www.opensource.org/licenses/MIT) に基づいて
|
|
|
1259
1256
|
移植言語/同様の言語:
|
|
1260
1257
|
|
|
1261
1258
|
* [Sliq (Slim/Liquid integration)](https://github.com/slim-template/sliq)
|
|
1262
|
-
* [Slm (Slim port to Javascript)](https://github.com/slm-lang/slm)
|
|
1263
|
-
* [Coffee script plugin for Slim](https://github.com/yury/coffee-views)
|
|
1264
|
-
* [Clojure port of Slim](https://github.com/chaslemley/slim.clj)
|
|
1265
1259
|
* [Hamlet.rb (Similar template language)](https://github.com/gregwebs/hamlet.rb)
|
|
1266
|
-
* [
|
|
1260
|
+
* [Slm (Slim port to Javascript)](https://github.com/slm-lang/slm)
|
|
1267
1261
|
* [Skim (Slim for Javascript)](https://github.com/jfirebaugh/skim)
|
|
1268
1262
|
* [Emblem.js (Javascript, similar to Slim)](https://github.com/machty/emblem.js)
|
|
1269
|
-
* [Hamlit (High performance Haml implementation, based on Temple like Slim)](https://github.com/k0kubun/hamlit)
|
|
1270
|
-
* [Faml (Faster Haml implementation, also using Temple like Slim)](https://github.com/eagletmt/faml)
|
|
1271
|
-
* [Haml (Older engine which inspired Slim)](https://github.com/haml/haml)
|
|
1272
1263
|
* [Jade (Similar engine for javascript)](https://github.com/visionmedia/jade)
|
|
1273
1264
|
* [Pug (Successor of Jade, Similar engine for javascript)](https://github.com/pugjs/pug)
|
|
1265
|
+
* [Coffee script plugin for Slim](https://github.com/yury/coffee-views)
|
|
1266
|
+
* [Plim (Python port of Slim)](https://github.com/2nd/plim)
|
|
1267
|
+
* [Trim-Template (Python template engine inspired by Slim)](https://github.com/opensourceame/trim-template)
|
|
1268
|
+
* [Clojure port of Slim](https://github.com/chaslemley/slim.clj)
|
|
1269
|
+
* [Hamlit (Haml implementation, using Temple like Slim)](https://github.com/k0kubun/hamlit)
|
|
1270
|
+
* [Faml (Haml implementation, using Temple like Slim)](https://github.com/eagletmt/faml)
|
|
1271
|
+
* [Haml (Older template engine which inspired Slim)](https://github.com/haml/haml)
|
|
1274
1272
|
* [Sweet (Similar engine which also allows to write classes and functions)](https://github.com/joaomdmoura/sweet)
|
|
1275
1273
|
* [Amber (Similar engine for Go)](https://github.com/eknkc/amber)
|
|
1276
1274
|
* [Slang (Slim-inspired templating language for Crystal)](https://github.com/jeromegn/slang)
|
|
@@ -41,7 +41,7 @@ A short list of the features...
|
|
|
41
41
|
### What is Slim?
|
|
42
42
|
|
|
43
43
|
Slim is a fast, lightweight templating engine with support for __Rails 5 and later__. It has been heavily tested on all major ruby implementations. We use
|
|
44
|
-
continuous integration (
|
|
44
|
+
continuous integration (GitHub actions).
|
|
45
45
|
|
|
46
46
|
Slim's core syntax is guided by one thought: "What's the minimum required to make this work".
|
|
47
47
|
|
|
@@ -502,7 +502,7 @@ You can also break ruby attributes with backslash `\` or trailing `,` as describ
|
|
|
502
502
|
#### Boolean attributes
|
|
503
503
|
|
|
504
504
|
The attribute values `true`, `false` and `nil` are interpreted
|
|
505
|
-
as booleans. If you use the attribute wrapper you can omit the attribute
|
|
505
|
+
as booleans. If you use the attribute wrapper you can omit the attribute assignment.
|
|
506
506
|
|
|
507
507
|
~~~ slim
|
|
508
508
|
input type="text" disabled="disabled"
|
|
@@ -578,7 +578,7 @@ with the :tag key.
|
|
|
578
578
|
|
|
579
579
|
~~~ slim
|
|
580
580
|
ruby:
|
|
581
|
-
def a_unless_current
|
|
581
|
+
def self.a_unless_current
|
|
582
582
|
@page_current ? {tag: 'span'} : {tag: 'a', href: 'https://slim-template.github.io/'}
|
|
583
583
|
end
|
|
584
584
|
- @page_current = true
|
|
@@ -696,7 +696,7 @@ which renders to
|
|
|
696
696
|
~~~ html
|
|
697
697
|
<script data-binding="products" type="text/javascript">
|
|
698
698
|
[{"name": "product1", "price": "$100"},
|
|
699
|
-
{"name": "
|
|
699
|
+
{"name": "product2", "price": "$200"}]
|
|
700
700
|
</script>
|
|
701
701
|
~~~
|
|
702
702
|
|
|
@@ -902,8 +902,8 @@ Supported engines:
|
|
|
902
902
|
| css: | none | Shortcut | Shortcut to embed css code and wrap in style tag |
|
|
903
903
|
| sass: | sass-embedded or sassc or sass | Compile time | Embed sass code and wrap in style tag |
|
|
904
904
|
| scss: | sass-embedded or sassc or sass | Compile time | Embed scss code and wrap in style tag |
|
|
905
|
-
| less: | less | Compile time | Embed less css code and wrap in style tag |
|
|
906
905
|
| coffee: | coffee-script | Compile time | Compile coffee script code and wrap in script tag |
|
|
906
|
+
| asciidoc: | asciidoctor | Compile time + Interpolation | Compile AsciiDoc code and interpolate #\{variables} in text |
|
|
907
907
|
| markdown: | redcarpet/rdiscount/kramdown | Compile time + Interpolation | Compile markdown code and interpolate #\{variables} in text |
|
|
908
908
|
| textile: | redcloth | Compile time + Interpolation | Compile textile code and interpolate #\{variables} in text |
|
|
909
909
|
| rdoc: | rdoc | Compile time + Interpolation | Compile rdoc code and interpolate #\{variables} in text |
|
|
@@ -918,7 +918,6 @@ You can also specify HTML attributes for the following embedded engines:
|
|
|
918
918
|
* Javascript
|
|
919
919
|
* CSS
|
|
920
920
|
* CoffeeScript
|
|
921
|
-
* LESS
|
|
922
921
|
* SASS
|
|
923
922
|
* SCSS
|
|
924
923
|
|
|
@@ -1114,11 +1113,11 @@ There are two ways to resolve it:
|
|
|
1114
1113
|
* Set `splat_prefix` to any custom value, double asterisk, for example: `splat_prefix: '**'`. Now structural directives should work as expected. Remember that now splat attributes should be written with new custom prefix before them.
|
|
1115
1114
|
* Use alternative directive syntax without asterisk.
|
|
1116
1115
|
|
|
1117
|
-
#### Attribute
|
|
1116
|
+
#### Attribute delimiters
|
|
1118
1117
|
|
|
1119
1118
|
Angular and slim both uses brackets in their syntax. So there are also two ways:
|
|
1120
1119
|
* Use alternative syntax for binding (`bind-...` and so on)
|
|
1121
|
-
* Limit attribute
|
|
1120
|
+
* Limit attribute delimiters to curly braces only:
|
|
1122
1121
|
```
|
|
1123
1122
|
code_attr_delims: {
|
|
1124
1123
|
'{' => '}',
|
|
@@ -1196,12 +1195,11 @@ There are plugins for various text editors (including the most important ones -
|
|
|
1196
1195
|
* [Textmate / Sublime Text](https://github.com/slim-template/ruby-slim.tmbundle)
|
|
1197
1196
|
* [Espresso text editor](https://github.com/slim-template/Slim-Sugar)
|
|
1198
1197
|
* [Coda](https://github.com/slim-template/Coda-2-Slim.mode)
|
|
1199
|
-
* [Atom](https://github.com/slim-template/language-slim)
|
|
1200
1198
|
* VS Code ([Official marketplace](https://marketplace.visualstudio.com/items?itemName=sianglim.slim), [Open VSX registry](https://open-vsx.org/extension/sianglim/slim))
|
|
1201
1199
|
|
|
1202
1200
|
### Template Converters (HAML, ERB, ...)
|
|
1203
1201
|
|
|
1204
|
-
* Slim can be converted to ERB using `slimrb` or `Slim::ERBConverter
|
|
1202
|
+
* Slim can be converted to ERB using `slimrb` or `Slim::ERBConverter` which are both included in the Slim gem
|
|
1205
1203
|
* [Haml2Slim converter](https://github.com/slim-template/haml2slim)
|
|
1206
1204
|
* [ERB2Slim, HTML2Slim converter](https://github.com/slim-template/html2slim)
|
|
1207
1205
|
|
|
@@ -1214,12 +1212,7 @@ There are plugins for various text editors (including the most important ones -
|
|
|
1214
1212
|
But we would be happy if you chose Slim also for any other reason, we assure
|
|
1215
1213
|
you performance will not be an obstacle.*
|
|
1216
1214
|
|
|
1217
|
-
|
|
1218
|
-
run the slow parsing benchmark which needs more time. You can also increase the number of iterations.
|
|
1219
|
-
|
|
1220
|
-
~~~
|
|
1221
|
-
$ rake bench slow=1 iterations=1000
|
|
1222
|
-
~~~
|
|
1215
|
+
For up-to-date benchmarks, please refer to our dedicated [Template engine benchmarks](https://github.com/slim-template/benchmarks) repository.
|
|
1223
1216
|
|
|
1224
1217
|
### Test suite and continuous integration
|
|
1225
1218
|
|
|
@@ -1259,7 +1252,8 @@ Slim is released under the [MIT license](http://www.opensource.org/licenses/MIT)
|
|
|
1259
1252
|
|
|
1260
1253
|
## Donations and sponsoring
|
|
1261
1254
|
|
|
1262
|
-
|
|
1255
|
+
This project relies on sponsoring for its continued maintenance. If you want to
|
|
1256
|
+
support the project, please visit the GitHub sponsors page.
|
|
1263
1257
|
|
|
1264
1258
|
[](https://github.com/sponsors/slim-template)
|
|
1265
1259
|
|
|
@@ -1281,7 +1275,6 @@ Syntax highlighting:
|
|
|
1281
1275
|
* [Textmate / Sublime Text](https://github.com/slim-template/ruby-slim.tmbundle)
|
|
1282
1276
|
* [Espresso text editor](https://github.com/slim-template/Slim-Sugar)
|
|
1283
1277
|
* [Coda](https://github.com/slim-template/Coda-2-Slim.mode)
|
|
1284
|
-
* [Atom](https://github.com/slim-template/language-slim)
|
|
1285
1278
|
|
|
1286
1279
|
Static code analysis:
|
|
1287
1280
|
|
|
@@ -1297,17 +1290,19 @@ Template Converters (HAML, ERB, ...):
|
|
|
1297
1290
|
Language ports/Similar languages:
|
|
1298
1291
|
|
|
1299
1292
|
* [Sliq (Slim/Liquid integration)](https://github.com/slim-template/sliq)
|
|
1300
|
-
* [Slm (Slim port to Javascript)](https://github.com/slm-lang/slm)
|
|
1301
|
-
* [Coffee script plugin for Slim](https://github.com/yury/coffee-views)
|
|
1302
|
-
* [Clojure port of Slim](https://github.com/chaslemley/slim.clj)
|
|
1303
1293
|
* [Hamlet.rb (Similar template language)](https://github.com/gregwebs/hamlet.rb)
|
|
1304
|
-
* [
|
|
1294
|
+
* [Slm (Slim port to Javascript)](https://github.com/slm-lang/slm)
|
|
1305
1295
|
* [Skim (Slim for Javascript)](https://github.com/jfirebaugh/skim)
|
|
1306
1296
|
* [Emblem.js (Javascript, similar to Slim)](https://github.com/machty/emblem.js)
|
|
1307
|
-
* [
|
|
1308
|
-
* [
|
|
1309
|
-
* [
|
|
1310
|
-
* [
|
|
1297
|
+
* [Jade (Similar engine for javascript)](https://github.com/visionmedia/jade)
|
|
1298
|
+
* [Pug (Successor of Jade, Similar engine for javascript)](https://github.com/pugjs/pug)
|
|
1299
|
+
* [Coffee script plugin for Slim](https://github.com/yury/coffee-views)
|
|
1300
|
+
* [Plim (Python port of Slim)](https://github.com/2nd/plim)
|
|
1301
|
+
* [Trim-Template (Python template engine inspired by Slim)](https://github.com/opensourceame/trim-template)
|
|
1302
|
+
* [Clojure port of Slim](https://github.com/chaslemley/slim.clj)
|
|
1303
|
+
* [Hamlit (Haml implementation, using Temple like Slim)](https://github.com/k0kubun/hamlit)
|
|
1304
|
+
* [Faml (Haml implementation, using Temple like Slim)](https://github.com/eagletmt/faml)
|
|
1305
|
+
* [Haml (Older template engine which inspired Slim)](https://github.com/haml/haml)
|
|
1311
1306
|
* [Sweet (Similar engine which also allows to write classes and functions)](https://github.com/joaomdmoura/sweet)
|
|
1312
1307
|
* [Amber (Similar engine for Go)](https://github.com/eknkc/amber)
|
|
1313
1308
|
* [Slang (Slim-inspired templating language for Crystal)](https://github.com/jeromegn/slang)
|
|
@@ -228,13 +228,13 @@ module Slim
|
|
|
228
228
|
end
|
|
229
229
|
|
|
230
230
|
# These engines are executed at compile time, embedded ruby is interpolated
|
|
231
|
+
register :asciidoc, InterpolateTiltEngine
|
|
231
232
|
register :markdown, InterpolateTiltEngine
|
|
232
233
|
register :textile, InterpolateTiltEngine
|
|
233
234
|
register :rdoc, InterpolateTiltEngine
|
|
234
235
|
|
|
235
236
|
# These engines are executed at compile time
|
|
236
237
|
register :coffee, JavaScriptEngine, engine: TiltEngine
|
|
237
|
-
register :less, TagEngine, tag: :style, engine: TiltEngine
|
|
238
238
|
register :sass, TagEngine, :pretty, tag: :style, engine: SassEngine
|
|
239
239
|
register :scss, TagEngine, :pretty, tag: :style, engine: SassEngine
|
|
240
240
|
|
|
@@ -27,7 +27,8 @@ module Slim
|
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
def section(name)
|
|
30
|
-
|
|
30
|
+
dict = scope[name]
|
|
31
|
+
if dict && !(dict.respond_to?(:empty?) && dict.empty?)
|
|
31
32
|
if !dict.respond_to?(:has_key?) && dict.respond_to?(:each)
|
|
32
33
|
new_scope do
|
|
33
34
|
dict.each do |d|
|
|
@@ -42,8 +43,8 @@ module Slim
|
|
|
42
43
|
end
|
|
43
44
|
|
|
44
45
|
def inverted_section(name)
|
|
45
|
-
|
|
46
|
-
yield if !
|
|
46
|
+
dict = scope[name]
|
|
47
|
+
yield if !dict || (dict.respond_to?(:empty?) && dict.empty?)
|
|
47
48
|
end
|
|
48
49
|
|
|
49
50
|
def to_s
|
|
@@ -48,25 +48,7 @@ module Slim
|
|
|
48
48
|
tag = @attrs.delete('tag').to_s
|
|
49
49
|
tag = @options[:default_tag] if tag.empty?
|
|
50
50
|
if block
|
|
51
|
-
|
|
52
|
-
#
|
|
53
|
-
# TODO: Add this as a helper somewhere to solve these capturing issues
|
|
54
|
-
# once and for all.
|
|
55
|
-
#
|
|
56
|
-
# If we have Slim capturing disabled and the scope defines the method `capture` (i.e. Rails)
|
|
57
|
-
# we use this method to capture the content.
|
|
58
|
-
#
|
|
59
|
-
# otherwise we just use normal Slim capturing (yield).
|
|
60
|
-
#
|
|
61
|
-
# See https://github.com/slim-template/slim/issues/591
|
|
62
|
-
# https://github.com/slim-template/slim#helpers-capturing-and-includes
|
|
63
|
-
#
|
|
64
|
-
content =
|
|
65
|
-
if @options[:disable_capture] && (scope = block.binding.eval('self')).respond_to?(:capture)
|
|
66
|
-
scope.capture(&block)
|
|
67
|
-
else
|
|
68
|
-
yield
|
|
69
|
-
end
|
|
51
|
+
content = capture_block_content(&block)
|
|
70
52
|
"<#{tag}#{build_attrs}>#{content}</#{tag}>"
|
|
71
53
|
else
|
|
72
54
|
"<#{tag}#{build_attrs} />"
|
|
@@ -90,6 +72,23 @@ module Slim
|
|
|
90
72
|
|
|
91
73
|
private
|
|
92
74
|
|
|
75
|
+
# Captures block content using the appropriate capturing mechanism.
|
|
76
|
+
#
|
|
77
|
+
# If we have Slim capturing disabled and the scope defines the method `capture` (i.e. Rails)
|
|
78
|
+
# we use this method to capture the content.
|
|
79
|
+
#
|
|
80
|
+
# Otherwise we just use normal Slim capturing (yield).
|
|
81
|
+
#
|
|
82
|
+
# See https://github.com/slim-template/slim/issues/591
|
|
83
|
+
# https://github.com/slim-template/slim#helpers-capturing-and-includes
|
|
84
|
+
def capture_block_content(&block)
|
|
85
|
+
if @options[:disable_capture] && (scope = block.binding.eval('self')).respond_to?(:capture)
|
|
86
|
+
scope.capture(&block)
|
|
87
|
+
else
|
|
88
|
+
yield
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
|
|
93
92
|
def hyphen_attr(name, escape, value)
|
|
94
93
|
if Hash === value
|
|
95
94
|
if @options[:hyphen_underscore_attrs]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Temple
|
|
2
2
|
======
|
|
3
3
|
|
|
4
|
-
[](https://github.com/judofyr/temple/actions/workflows/test.yml) [](https://github.com/judofyr/temple/actions/workflows/test.yml) [](https://qlty.sh/gh/judofyr/projects/temple) [](https://rubygems.org/gems/temple) [](http://rubydoc.info/gems/temple/frames)
|
|
5
5
|
|
|
6
6
|
Temple is an abstraction and a framework for compiling templates to pure Ruby.
|
|
7
7
|
It's all about making it easier to experiment, implement and optimize template
|
data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/static_analyzer.rb
RENAMED
|
@@ -4,7 +4,7 @@ module Temple
|
|
|
4
4
|
# Convert [:dynamic, code] to [:static, text] if code is static Ruby expression.
|
|
5
5
|
class StaticAnalyzer < Filter
|
|
6
6
|
def call(exp)
|
|
7
|
-
# Optimize only when
|
|
7
|
+
# Optimize only when a parser engine is available.
|
|
8
8
|
if ::Temple::StaticAnalyzer.available?
|
|
9
9
|
super
|
|
10
10
|
else
|