Last active
August 29, 2015 14:15
-
-
Save edward/92e8bdfcd3ee50d4c81a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'nokogiri' | |
html = %(<div class="next-input-wrapper"><label class="next-label next-label--switch" for="radio-2"><input class="next-radio" id="radio-2" name="radio-group" type="radio" value="2" /><span class="next-radio--styled"></span>A longer label with text that wraps (just resize the iframe to see me in action!)</label></div>) | |
doc = Nokogiri::XML(html,&:noblanks) | |
puts doc.to_xml | |
__END__ | |
<div class="next-input-wrapper"> | |
<label for="radio-2" class="next-label next-label--switch"> | |
<input type="radio" class="next-radio" id="radio-2" name="radio-group" /> | |
<span class="next-radio--styled"></span> | |
A longer label with text that wraps (just resize the iframe to see me in action!) | |
</label> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment