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

riseuplabs/uglify_html

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

Make a Html document ugly

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%