Skip to content

Commit

Permalink
do not include text after snippet exclusion end
Browse files Browse the repository at this point in the history
  • Loading branch information
eitan committed Jun 25, 2014
1 parent 736b44e commit 2f55e12
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions docs/_plugins/include_snippet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,11 @@ def render(context)
if (line =~ /snippet_exclude_end/)
# add what comes after "snippet_exclude_end" as a block replacement
# for example "// ..."
index = line.index(/snippet_exclude_end/)
if (index) + 20 +1 < line.length
source += line[index+20..line.length]
end
# update: disabled. causes problems in cases like <!--snippet_exclude_end-->
# index = line.index(/snippet_exclude_end/)
# if (index) + 20 +1 < line.length
# source += line[index+20..line.length]
# end
exclude = false
end
if line =~ /snippet #{@title}/
Expand Down

0 comments on commit 2f55e12

Please sign in to comment.