Skip to content

Instantly share code, notes, and snippets.

@panoply
Forked from mat813/summarize.rb
Created July 27, 2019 18:19
Show Gist options
  • Save panoply/8e60752850c703e38d23532f6d0897d9 to your computer and use it in GitHub Desktop.
Save panoply/8e60752850c703e38d23532f6d0897d9 to your computer and use it in GitHub Desktop.
module Jekyll
module Filters
def summarize(str, splitstr = /\s*<div id="extended">/)
str.split(splitstr)[0]
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment