Skip to content
This repository was archived by the owner on Feb 2, 2025. It is now read-only.

Commit dba9b70

Browse files
committed
Merge "Enable regexp to find ngRepeat comment in multiple lines" #252
2 parents 5542e76 + d2f3001 commit dba9b70

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/angular-datatables.renderer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,12 @@ function dtNGRenderer($log, $q, $compile, $timeout, DTRenderer, DTRendererServic
173173
var _expression = $elem.find('tbody').html();
174174
// Find the resources from the comment <!-- ngRepeat: item in items --> displayed by angular in the DOM
175175
// This regexp is inspired by the one used in the "ngRepeat" directive
176-
var _match = _expression.match(/^\s*.+?\s+in\s+(\S*)\s*/);
177-
var _ngRepeatAttr = _match[1];
176+
var _match = _expression.match(/^\s*.+?\s+in\s+(\S*)\s*/m);
178177

179178
if (!_match) {
180179
throw new Error('Expected expression in form of "_item_ in _collection_[ track by _id_]" but got "{0}".', _expression);
181180
}
181+
var _ngRepeatAttr = _match[1];
182182

183183
var _alreadyRendered = false;
184184

0 commit comments

Comments
 (0)