Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion _plugins/filters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,13 @@ def snippet(file,type,number)

from,to = from.to_i,to.to_i

range = parse_range_string(number)
if from > to
raise ArgumentError, <<-MSG
Line number from > to in 'snippet' filter
MSG
end

range = from..to

if type =~ /^line/
if to > content.lines.count
Expand Down
4 changes: 2 additions & 2 deletions tutorials/clocks/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,11 @@ read in the tree estimated by {% cite DosReis2012 %}.
From the tree we can initialize some useful variables. (These can also
be created from the data matrix using the same methods.)

{{ BDP_script | tagged_snippet: "### get helpful variables from the tree", "2" }}
{{ BDP_script | tagged_snippet: "### get helpful variables from the tree", "1-2" }}

Finally, we initialize a variable for our vector of moves and monitors.

{{ BDP_script | tagged_snippet: "## Initialize move and monitor vectors", "2" }}
{{ BDP_script | tagged_snippet: "## Initialize move and monitor vectors", "1-2" }}

### Birth-Death Parameters

Expand Down