mirror of
https://github.com/WatchOutNewsAgency/wona.github.com.git
synced 2026-01-01 01:16:26 +00:00
1. Vastly improved backtick code blocks and added support for Textile
2. Refactored Octopress filters into Liquid filters and pre/post render filters (using post_filters plugin) 3. Added methods to raw plugin to prevent Markdown and Textile from parsing blocks 4. Updated render partial to invoke the pre_render method of post_filters 5. Moved Rubypants filter out of default.html into Octopress post_render filters 6. Added raw's safe_wrapper method to codeblock and include_code filters
This commit is contained in:
@ -1,3 +1,19 @@
|
||||
# Author: Brandon Mathis
|
||||
# Description: Provides plugins with a method for wrapping and unwrapping input to prevent Markdown and Textile from parsing it.
|
||||
# Purpose: This is useful for preventing Markdown and Textile from being too aggressive and incorrectly parsing in-line HTML.
|
||||
module TemplateWrapper
|
||||
# Wrap input with a <div>
|
||||
def safe_wrap(input)
|
||||
"<div class='bogus-wrapper'><notextile>#{input}</notextile></div>"
|
||||
end
|
||||
# This must be applied after the
|
||||
def unwrap(input)
|
||||
input.gsub /<div class='bogus-wrapper'><notextile>(.+?)<\/notextile><\/div>/m do
|
||||
$1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Author: phaer, https://github.com/phaer
|
||||
# Source: https://gist.github.com/1020852
|
||||
# Description: Raw tag for jekyll. Keeps liquid from parsing text betweeen {% raw %} and {% endraw %}
|
||||
|
||||
Reference in New Issue
Block a user