Skip to content

Instantly share code, notes, and snippets.

@bean5
Last active December 28, 2015 23:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bean5/7581892 to your computer and use it in GitHub Desktop.
Save bean5/7581892 to your computer and use it in GitHub Desktop.
ignore whitespace in bb
function removeEmptys() {
$body = $('body');
$body.html($body.html().replace(/<del>(\s*)<\/del>/, '$1'));
$body.html($body.html().replace(/<ins>(\s*)<\/ins>/, '$1'));
//@TODO: Remove additions/deletions that are marked but don't need to be
}
//TODO implement removeEmptyParents()
function removeEmptyParents() {
additionDeletions = $('.addition, .deletion');
//@TODO: Remove additions/deletions that are marked but don't need to be
}
removeEmptys();
removeEmptyParents();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment