```coffeescript
ssdeep = require 'ssdeep'
htmlToText = require 'html-to-text'
fs = require 'fs'

extractText = (body) ->
  return htmlToText.fromString body

module.exports = {
  computeHash: (body, contentType) ->
    if contentType and /text\/html/.test(contentType)
      body = extractText(body)
    return ssdeep.hash(body)
}
```

Remove spaces before computing hash
user
```coffeescript
ssdeep = require 'ssdeep'
htmlToText = require 'html-to-text'
fs = require 'fs'

extractText = (body) ->
  return htmlToText.fromString body

removeSpaces = (body) ->
  return body.replace(/\s+/g, ' ')

module.exports = {
  computeHash: (body, contentType) ->
    if contentType and /text\/html/.test(contentType)
      body = extractText(body)
      body = removeSpaces(body)
    return ssdeep.hash(body)
}
```
assistant