app/assets/javascripts/i18n_viz/processing.js.coffee in i18n_viz-0.3.1 vs app/assets/javascripts/i18n_viz/processing.js.coffee in i18n_viz-0.3.2
- old
+ new
@@ -17,12 +17,13 @@
.data("i18n-keys", i18n_keys)
$i18n_element
# clear i18n data from element text
$.fn.clearI18nText = () ->
- $(this).textNodes().each () ->
- $(this).replaceWith $(this).text().replace(I18nViz.global_regex, "")
- $(this)
+ $el = $(this)
+ $el.textNodes().each () ->
+ $el.text $el.text().replace(I18nViz.global_regex, "")
+ $el
# custom :i18n selectors
$.extend $.expr[':'], {
'i18n-textnode': (el) ->
window.I18nViz.regex.test $(el).textNodes().text()
\ No newline at end of file