From 75087c39989cf4f7692061f817f14702d0984d4c Mon Sep 17 00:00:00 2001 From: Roberto Alsina Date: Sun, 6 Sep 2026 04:51:17 -0300 Subject: [PATCH 1/2] ci: bump ameba to v1.7.0, install dev deps for specs - ameba v1.6.4 no longer compiles with current Crystal runners (undefined method 'next_string_array_token' on Crystal::Lexer); v1.7.0 supports Crystal >= 1.19. - The specs job needs development dependencies: the tartrazine require test compile-runs spec/fixtures/tartrazine.cr, so --without-development breaks spec compilation on every OS. --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fc1bd28..06cee60 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ameba-version: [v1.6.4] + ameba-version: [v1.7.0] name: Ameba ${{ matrix.ameba-version }} linter check steps: - name: Install latest Crystal @@ -64,7 +64,7 @@ jobs: crystal: ${{ matrix.crystal }} - name: Install dependencies - run: shards install --without-development + run: shards install - name: Run specs run: crystal spec --error-on-warnings --error-trace From 2c0ff8502c99dee7e8a24145e39e2fcf28fa5d4c Mon Sep 17 00:00:00 2001 From: Roberto Alsina Date: Sun, 6 Sep 2026 04:51:17 -0300 Subject: [PATCH 2/2] chore: fix lint issues flagged by ameba 1.7 - keep the Markd.to_html call in the tartrazine fixture without the unused assignment - space out the macro expression in Node#inspect - drop a redundant return in the inline parser --- spec/fixtures/tartrazine.cr | 8 ++++---- src/markd/node.cr | 2 +- src/markd/parsers/inline.cr | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/fixtures/tartrazine.cr b/spec/fixtures/tartrazine.cr index 5b1cb9f..f3473bf 100644 --- a/spec/fixtures/tartrazine.cr +++ b/spec/fixtures/tartrazine.cr @@ -2,9 +2,9 @@ require "tartrazine" require "../../src/markd" markdown = <<-MD -# Hello Markd + # Hello Markd -> Yet another markdown parser built for speed, written in Crystal, Compliant to CommonMark specification. -MD + > Yet another markdown parser built for speed, written in Crystal, Compliant to CommonMark specification. + MD -html = Markd.to_html(markdown) +Markd.to_html(markdown) diff --git a/src/markd/node.cr b/src/markd/node.cr index 31223b3..81b9347 100644 --- a/src/markd/node.cr +++ b/src/markd/node.cr @@ -132,7 +132,7 @@ module Markd end def to_s(io : IO) - io << "#<" << {{@type.name.id.stringify}} << ":0x" + io << "#<" << {{ @type.name.id.stringify }} << ":0x" object_id.to_s(16, io) io << " @type=" << @type io << " @parent=" << @parent if @parent diff --git a/src/markd/parsers/inline.cr b/src/markd/parsers/inline.cr index 8854318..dddecaa 100644 --- a/src/markd/parsers/inline.cr +++ b/src/markd/parsers/inline.cr @@ -904,7 +904,7 @@ module Markd::Parser text = @text.byte_slice(@pos) if (match = text.match(regex)) @pos += match.byte_end.not_nil! - return match[0] + match[0] end end