- var container = $(this.content.find('#' + options.inside.getId()).get(0));\r
- \r
- var containerContent = container.contents();\r
- var idx1 = Math.min.apply(Math, options.textNodeIdx);\r
- var idx2 = Math.max.apply(Math, options.textNodeIdx);\r
- var textNode1 = $(containerContent.get(idx1));\r
- var textNode2 = $(containerContent.get(idx2));\r
- var sameNode = textNode1.get(0) === textNode2.get(0);\r
+ \r
+ var container = $(this.content.find('#' + options.inside.getId()).get(0)),\r
+ containerContent = container.contents(),\r
+ idx1 = Math.min.apply(Math, options.textNodeIdx),\r
+ idx2 = Math.max.apply(Math, options.textNodeIdx),\r
+ textNode1 = $(containerContent.get(idx1)),\r
+ textNode2 = $(containerContent.get(idx2)),\r
+ sameNode = textNode1.get(0) === textNode2.get(0),\r
+ prefixOutside = textNode1.text().substr(0, options.offsetStart),\r
+ prefixInside = textNode1.text().substr(options.offsetStart),\r
+ suffixInside = textNode2.text().substr(0, options.offsetEnd),\r
+ suffixOutside = textNode2.text().substr(options.offsetEnd)\r
+ ;\r
+ \r