Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Very simple helper for parsing tags in HTML

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .document
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .rspec
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 LICENSE.txt
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 VERSION
Octocat-spinner-32 xan_markup.gemspec
README.md

XanMarkup

Very simple tag parser

Install & Example

Add to your Gemfile

gem "xan_markup"

Create helper (call it like you want)

module MarkupHelper
  include XanMarkup::Helper

  def markup_favorite_movie
    "Matrix"
  end
end

In views use:

<%= markupize("My favorite movie is {{ favorite_movie }}") %>

Atributes

You can pass attributes to tags

{{ favorite_movie genre="sf-fi" }}

def markup_favorite_movie(hash_of_args)
  ....
end

Copyright (c) 2009-20011 Grzegorz Derebecki, released under the MIT license

Something went wrong with that request. Please try again.