A Markdown shard for the Crystal programming language
Revision | 76ab365bdb3d104ff0453537b4fb5f4d0f1edce6 (tree) |
---|---|
Time | 2023-09-24 08:00:25 |
Author | supercell <stigma@disr...> |
Commiter | supercell |
Fix misc. ameba warnings
@@ -53,11 +53,7 @@ The currently supported block extension syntaxes are: | ||
53 | 53 | For example: |
54 | 54 | |
55 | 55 | ```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>), | |
61 | 57 | inline_syntaxes: [Luce::InlineHTMLSyntax.new]) |
62 | 58 | |
63 | 59 | puts html # => <p>Hello <span class="green">Markdown</span></p>\n |
@@ -1,8 +1,9 @@ | ||
1 | +# ameba:disable Lint/Formatting | |
1 | 2 | # GENERATED FILE. DO NOT EDIT. |
2 | 3 | # |
3 | 4 | # This file was generated from big-list-of-naughty-strings' JSON file: |
4 | 5 | # 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. | |
6 | 7 | |
7 | 8 | module BLNS |
8 | 9 | def self.each(& : String ->) : Nil |
@@ -1,3 +1,4 @@ | ||
1 | +# ameba:disable Lint/Formatting | |
1 | 2 | # Generated file. do not edit. |
2 | 3 | # |
3 | 4 | # Source: tools/entities.json |
@@ -39,7 +39,6 @@ module Luce | ||
39 | 39 | # The Markdown tests expect a trailing newline |
40 | 40 | child_lines << Line.new("") |
41 | 41 | |
42 | - # ameba:disable Style/VerboseBlock | |
43 | 42 | content = child_lines.map { |e| e.content.prepend_space(e.tab_remaining || 0) }.join("\n") |
44 | 43 | content = Luce.escape_html(content, escape_apos: false) if parser.document.encode_html? |
45 | 44 |
@@ -9,6 +9,7 @@ json = Array(String).from_json(response.body) | ||
9 | 9 | |
10 | 10 | blns_content = String::Builder.new |
11 | 11 | blns_content << <<-EOS |
12 | +# ameba:disable Lint/Formatting | |
12 | 13 | # GENERATED FILE. DO NOT EDIT. |
13 | 14 | # |
14 | 15 | # This file was generated from big-list-of-naughty-strings' JSON file: |
@@ -18,7 +19,7 @@ blns_content << <<-EOS | ||
18 | 19 | EOS |
19 | 20 | |
20 | 21 | blns_content.puts "module BLNS" |
21 | -blns_content.puts " def self.each(&block : String ->) : Nil" | |
22 | +blns_content.puts " def self.each(& : String ->) : Nil" | |
22 | 23 | blns_content.puts " @@list.each { |element| yield element }" |
23 | 24 | blns_content.puts " end" |
24 | 25 | blns_content.puts |
@@ -16,6 +16,7 @@ end | ||
16 | 16 | output_path = Path[Dir.current, "src", "luce", "assets", "html_entities.cr"] |
17 | 17 | string_map = result.pretty_inspect(indent: 2) |
18 | 18 | output = <<-EOS |
19 | +# ameba:disable Lint/Formatting | |
19 | 20 | # Generated file. do not edit. |
20 | 21 | # |
21 | 22 | # Source: tools/entities.json |
@@ -28,6 +29,6 @@ module Luce | ||
28 | 29 | def self.html_entities_map : Hash(String, String) |
29 | 30 | @@html_entities_map |
30 | 31 | end |
31 | -end | |
32 | +end\n | |
32 | 33 | EOS |
33 | 34 | File.write(output_path, output) |