# How to ignore whitespaces difference while taking htmldiff

**URL:** <https://www.ruby-forum.com/t/how-to-ignore-whitespaces-difference-while-taking-htmldiff/168822>\
**Category:** Ruby\
**Created:** [May 26, 2009, 12:57pm UTC](https://www.ruby-forum.com/t/how-to-ignore-whitespaces-difference-while-taking-htmldiff/168822 "2009-05-26T12:57:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![virendra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/e68b1a/32.png) [@virendra](https://www.ruby-forum.com/u/virendra)\
**Post date:** [May 26, 2009, 12:57pm UTC](https://www.ruby-forum.com/t/how-to-ignore-whitespaces-difference-while-taking-htmldiff/168822/1 "2009-05-26T12:57:39Z")

</div>

hi  
I want to know how can I ignore the white spaces which too get into  
account while taking the difference between the two html

I mean if I have an html like this

hi in body and suppose I insert a space between the html an body tag like this hi in body

then that white space is also consider as a difference which is true  
but I want only those differences where certian text is changed or added

that mean i want to ignore whitespaces differences

Any Idea

Thank Anyway
