Skip to content

Commit 01941ee

Browse files
ashmarolijekyllbot
authored andcommitted
Use Liquid::Tag#raw to clarify error message (#73)
Merge pull request 73
1 parent a2fc4e4 commit 01941ee

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/jekyll-gist/gist_tag.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def render(context)
2525
raise ArgumentError, <<~ERROR
2626
Syntax error in tag 'gist' while parsing the following markup:
2727
28-
#{@markup}
28+
'{% #{raw.strip} %}'
2929
3030
Valid syntax:
3131
{% gist user/1234567 %}

spec/gist_tag_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@
168168
let(:gist) { "" }
169169

170170
it "raises an error" do
171-
expect(-> { output }).to raise_error
171+
expect(-> { output }).to raise_error(ArgumentError)
172172
end
173173
end
174174
end

0 commit comments

Comments
 (0)