This commit is contained in:
Roberto Alsina 2023-07-14 13:57:12 -03:00
parent 91a8c57966
commit d55a1c6bad
2 changed files with 1 additions and 3 deletions

View File

@ -7,7 +7,6 @@ describe "Shortcodes" do
it "works" do it "works" do
input = "foo{{% bar %}}baz{{% /bar %}}qux" input = "foo{{% bar %}}baz{{% /bar %}}qux"
result = parse(input) result = parse(input)
p! result.shortcodes
result.shortcodes.size.should eq 1 result.shortcodes.size.should eq 1
result.shortcodes[0].args.size.should eq 0 result.shortcodes[0].args.size.should eq 0
result.shortcodes[0].name.should eq "bar" result.shortcodes[0].name.should eq "bar"

View File

@ -60,7 +60,6 @@ module Shortcodes
def parse(input : String) def parse(input : String)
r = LibShortcodes.parse(input.to_unsafe, input.bytesize) r = LibShortcodes.parse(input.to_unsafe, input.bytesize)
result = Result.new result = Result.new
p! r.sccount
(0...r.sccount).each do |i| (0...r.sccount).each do |i|
sc = r.shortcodes[i] sc = r.shortcodes[i]