diff --git a/COPYING b/COPYING index 7879e887..2f99dc1e 100644 --- a/COPYING +++ b/COPYING @@ -13,6 +13,6 @@ all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index ba4d23c5..cb54d80d 100644 --- a/README.md +++ b/README.md @@ -184,7 +184,7 @@ template, but if you depend on a specific implementation, you should use #prefer # Prefer BlueCloth for all its registered extensions (markdown, mkd, md) Tilt.prefer Tilt::BlueClothTemplate - + # Prefer Erubis for .erb only: Tilt.prefer Tilt::ErubisTemplate, 'erb' diff --git a/TEMPLATES.md b/TEMPLATES.md index f9314159..3efc5fe3 100644 --- a/TEMPLATES.md +++ b/TEMPLATES.md @@ -57,7 +57,7 @@ implementations. ### Example Hello <%= world %>! - + ### Usage ERB templates support custom evaluation scopes and locals: @@ -379,7 +379,7 @@ engine, which is a Ruby extension written in C. ### Example h1. Hello Textile Templates - + Hello World. This is a paragraph. ### Usage @@ -434,7 +434,7 @@ Markdown formatted texts are converted to HTML with one of these libraries: * Maruku - `Tilt::MarukuTemplate` Tilt will use fallback mode (as documented in the README) for determining which -library to use. RDiscount has highest priority - Maruku has lowest. +library to use. RDiscount has highest priority - Maruku has lowest. ### Example diff --git a/test/tilt_fallback_test.rb b/test/tilt_fallback_test.rb index 9e6d020b..067fae1a 100644 --- a/test/tilt_fallback_test.rb +++ b/test/tilt_fallback_test.rb @@ -5,7 +5,7 @@ class TiltFallbackTest < Test::Unit::TestCase class FailTemplate < Tilt::Template def self.engine_initialized?; false end def prepare; end - + def initialize_engine raise LoadError, "can't load #{self.class}" end @@ -22,7 +22,7 @@ def prepare; end def set_ivar(obj, name, value) obj.instance_variable_set("@#{name}", value) end - + def clear_ivar(obj, name) ivar = "@#{name}" value = obj.instance_variable_get(ivar) @@ -49,7 +49,7 @@ def clear_ivar(obj, name) test "returns the last registered template" do Tilt.register("md", WinTemplate) Tilt.register("md", WinTemplate2) - + template = Tilt["md"] assert_equal WinTemplate2, template end @@ -87,7 +87,7 @@ def clear_ivar(obj, name) test ".prefer accepts multiple extensions" do extensions = %w[md mkd markdown] Tilt.prefer(FailTemplate, *extensions) - + extensions.each do |ext| template = Tilt[ext] assert_equal FailTemplate, template @@ -96,7 +96,7 @@ def clear_ivar(obj, name) test ".prefer with no extension should use already registered extensions" do extensions = %w[md mkd markdown] - + extensions.each do |ext| Tilt.register(ext, FailTemplate) Tilt.register(ext, WinTemplate) @@ -109,7 +109,7 @@ def clear_ivar(obj, name) assert_equal FailTemplate, template end end - + test ".prefer should only override extensions the preferred library is registered for" do Tilt.register("md", WinTemplate) Tilt.register("mkd", FailTemplate) diff --git a/test/tilt_markdown_test.rb b/test/tilt_markdown_test.rb index 9e31a5e7..f67a8e28 100644 --- a/test/tilt_markdown_test.rb +++ b/test/tilt_markdown_test.rb @@ -26,7 +26,7 @@ def nrender(text, options = {}) html.encode!("UTF-8") if html.respond_to?(:encode) normalize(html) end - + def test_escape_html html = nrender "Hello World" assert_equal "

Hello World

", html @@ -133,7 +133,7 @@ class MarkdownKramdownTest < Test::Unit::TestCase # It should already be warned in the main tests end - + begin require 'maruku' diff --git a/test/tilt_stringtemplate_test.rb b/test/tilt_stringtemplate_test.rb index cc7b684d..f0a89198 100644 --- a/test/tilt_stringtemplate_test.rb +++ b/test/tilt_stringtemplate_test.rb @@ -119,7 +119,7 @@ class Scope assert_equal "Hello\nWorld!\n", template.render(Scope.new) end - + test "template with '}'" do template = Tilt::StringTemplate.new { "Hello }" } assert_equal "Hello }", template.render