diff options
| author | Igor Minar | 2012-12-04 18:24:15 +0100 | 
|---|---|---|
| committer | Igor Minar | 2013-05-08 07:57:34 -0700 | 
| commit | 86b33eb3f1360a4cefb5ebf522b6649f9c55db55 (patch) | |
| tree | 08c6f14278eee56439b11b1ab6c4dcb3e9e2846c /test/testabilityPatch.js | |
| parent | 202087f03da20741b8e4b248e53994a6ff1cce3e (diff) | |
| download | angular.js-86b33eb3f1360a4cefb5ebf522b6649f9c55db55.tar.bz2 | |
test(sortedHtml): fix comment support in sortedHtml helper
Diffstat (limited to 'test/testabilityPatch.js')
| -rw-r--r-- | test/testabilityPatch.js | 3 | 
1 files changed, 3 insertions, 0 deletions
| diff --git a/test/testabilityPatch.js b/test/testabilityPatch.js index 679294ee..732669c5 100644 --- a/test/testabilityPatch.js +++ b/test/testabilityPatch.js @@ -120,11 +120,14 @@ function dealoc(obj) {  function sortedHtml(element, showNgClass) {    var html = "";    forEach(jqLite(element), function toString(node) { +      if (node.nodeName == "#text") {        html += node.nodeValue.          replace(/&(\w+[&;\W])?/g, function(match, entity){return entity?match:'&';}).          replace(/</g, '<').          replace(/>/g, '>'); +    } else if (node.nodeName == "#comment") { +      html += '<!--' + node.nodeValue + '-->';      } else {        html += '<' + (node.nodeName || '?NOT_A_NODE?').toLowerCase();        var attributes = node.attributes || []; | 
