• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

A Markdown shard for the Crystal programming language


Commit MetaInfo

Revision76ab365bdb3d104ff0453537b4fb5f4d0f1edce6 (tree)
Time2023-09-24 08:00:25
Authorsupercell <stigma@disr...>
Commitersupercell

Log Message

Fix misc. ameba warnings

Change Summary

Incremental Difference

--- a/README.md
+++ b/README.md
@@ -53,11 +53,7 @@ The currently supported block extension syntaxes are:
5353 For example:
5454
5555 ```crystal
56-md = <<-MD
57-Hello <span class="green">Markdown</span>
58-MD
59-
60-html = Luce.to_html(md,
56+html = Luce.to_html(%(Hello <span class="green">Markdown</span>),
6157 inline_syntaxes: [Luce::InlineHTMLSyntax.new])
6258
6359 puts html # => <p>Hello <span class="green">Markdown</span></p>\n
--- a/spec/blns.cr
+++ b/spec/blns.cr
@@ -1,8 +1,9 @@
1+# ameba:disable Lint/Formatting
12 # GENERATED FILE. DO NOT EDIT.
23 #
34 # This file was generated from big-list-of-naughty-strings' JSON file:
45 # https://raw.githubusercontent.com/minimaxir/big-list-of-naughty-strings/master/blns.json
5-# at 2023-02-04 02:28:33 UTC by the script, tools/update_blns.cr.
6+# at 2023-09-23 22:55:43 UTC by the script, tools/update_blns.cr.
67
78 module BLNS
89 def self.each(& : String ->) : Nil
--- a/src/luce/assets/html_entities.cr
+++ b/src/luce/assets/html_entities.cr
@@ -1,3 +1,4 @@
1+# ameba:disable Lint/Formatting
12 # Generated file. do not edit.
23 #
34 # Source: tools/entities.json
--- a/src/luce/block_syntaxes/code_block_syntax.cr
+++ b/src/luce/block_syntaxes/code_block_syntax.cr
@@ -39,7 +39,6 @@ module Luce
3939 # The Markdown tests expect a trailing newline
4040 child_lines << Line.new("")
4141
42- # ameba:disable Style/VerboseBlock
4342 content = child_lines.map { |e| e.content.prepend_space(e.tab_remaining || 0) }.join("\n")
4443 content = Luce.escape_html(content, escape_apos: false) if parser.document.encode_html?
4544
--- a/tools/update_blns.cr
+++ b/tools/update_blns.cr
@@ -9,6 +9,7 @@ json = Array(String).from_json(response.body)
99
1010 blns_content = String::Builder.new
1111 blns_content << <<-EOS
12+# ameba:disable Lint/Formatting
1213 # GENERATED FILE. DO NOT EDIT.
1314 #
1415 # This file was generated from big-list-of-naughty-strings' JSON file:
@@ -18,7 +19,7 @@ blns_content << <<-EOS
1819 EOS
1920
2021 blns_content.puts "module BLNS"
21-blns_content.puts " def self.each(&block : String ->) : Nil"
22+blns_content.puts " def self.each(& : String ->) : Nil"
2223 blns_content.puts " @@list.each { |element| yield element }"
2324 blns_content.puts " end"
2425 blns_content.puts
--- a/tools/update_entities.cr
+++ b/tools/update_entities.cr
@@ -16,6 +16,7 @@ end
1616 output_path = Path[Dir.current, "src", "luce", "assets", "html_entities.cr"]
1717 string_map = result.pretty_inspect(indent: 2)
1818 output = <<-EOS
19+# ameba:disable Lint/Formatting
1920 # Generated file. do not edit.
2021 #
2122 # Source: tools/entities.json
@@ -28,6 +29,6 @@ module Luce
2829 def self.html_entities_map : Hash(String, String)
2930 @@html_entities_map
3031 end
31-end
32+end\n
3233 EOS
3334 File.write(output_path, output)