Skip to content
This repository has been archived by the owner on Feb 3, 2018. It is now read-only.

Latest commit

 

History

History
60 lines (38 loc) · 843 Bytes

README.rdoc

File metadata and controls

60 lines (38 loc) · 843 Bytes

UglifyHtml

Ugly small lib to convert HTML markup to ugly HTML markup.

Things such these happen…

<strong>some bold text</strong>

to

<span style="font-weight: bold"></span>

-

<em>some bold text</em>

to

<span style="font-style: italic"></span>

-

<ul>
  <li>Item 1</li>
  <li>Item 2
    <ul>
      <li>Item 1 List 2</li>
    </ul>
  </li>
</ul>

to

<ul>
  <li>Item 1</li>
  <li>Item 2
    <ul>
      <li>Item 1 List 2</li>
    </ul>
  </li>
</ul>

Why?

  • Put it inside a nicEdit Wysiwyg editor.

With

  • Hpricot

  • Hpricot extensions Elem::Trav::add_style, Elem::Trav::has_style?, Elem::change_tag!

Get it

gem install zevarito-uglify_html

License

Authors

Alvaro Gil (zevarito)

License

MIT (Check LICENSE for details)