diff options
Diffstat (limited to '')
-rw-r--r-- | _plugins/generate-pastebin-plaintext-alternate.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/_plugins/generate-pastebin-plaintext-alternate.rb b/_plugins/generate-pastebin-plaintext-alternate.rb index 110a943..5ab059d 100644 --- a/_plugins/generate-pastebin-plaintext-alternate.rb +++ b/_plugins/generate-pastebin-plaintext-alternate.rb @@ -16,14 +16,14 @@ module Jekyll .run # generate the HTML string .scan(CODE_BLOCK) # match all occurrences of regexp .each do |code_block| # iterate on each match - unhighlighted_code = code_block[0] # regexp only defines 1 match (only 1 parens) - .gsub(/<span class=".*?">(.*?)<\/span>/m, '\1') - content = CGI.unescapeHTML unhighlighted_code - name = "#{document.url}.#{n}.txt" - plain = PageWithoutAFile.new(site, site.source, "", name) - plain.content = content - site.pages << plain - n += 1 + unhighlighted_code = code_block[0] # regexp only defines 1 match (only 1 parens) + .gsub(/<span class=".*?">(.*?)<\/span>/m, '\1') + content = CGI.unescapeHTML unhighlighted_code + name = "#{document.url}.#{n}.txt" + plain = PageWithoutAFile.new(site, site.source, "", name) + plain.content = content + site.pages << plain + n += 1 end end end |