Skip to content

Instantly share code, notes, and snippets.

View croaker's full-sized avatar

Daniel Gruenthal croaker

  • Hamburg, Germany
View GitHub Profile
# Transforms the styles to HTML-Tags
styled_span_to_formatting_tags = lambda do |env|
original_node = env[:node]
wrap_with_tags = []
if original_node.name == "span" && original_node.has_attribute?("style")
css_rules = original_node.attribute("style").value.split(";")
wrap_with_tags = css_rules.collect do |css_rule|
case css_rule.strip
when /^text-decoration:\s*underline$/ then "u"
require 'net/dns/resolver'
# Custom Domain
#
# Require net-dns gem
#
# A Rack middleware to to resolve the custom domain to original subdomain
# for your multi telent application.
#
# It's all transperant to your application, it performs cname lookup and