Closed fontsie closed 8 years ago
Interesting!
This breaks some of our test cases, so it needs some work.
Also: could you please add a test case that illustrates the new behavior (in other words: a test case that fails without these changes). I don't accept changes like these unless they're illustrated by a good test case, otherwise there's no way to ensure we don't accidentally break it in the future.
Hi! Can you check if everything is ok?
Looks good to me, merging!
Released to NPM as 2.1.8
. Thanks!
I had to revert this: it breaks extraction of strings for some of the cases we're seeing in one of our projects. Working on a test case right now.
Just pushed a test case that fails with the code from this pull request (and worked fine previously).
1) Extract (multi-line HTML) Issue 122:
AssertionError: 'text-align\': col.align }">{{row[col.id]}}</td></tr></tbody></table><div ng-if="options.type == \'table\' && options.da == 'No data'
+ expected - actual
-text-align': col.align }">{{row[col.id]}}</td></tr></tbody></table><div ng-if="options.type == 'table' && options.data.rows.length == 0" class="panel-body"><div class="vis"><svg width="100%" height="100" class="chart"><g width="100%" height="100%" class="nodata"><text text-anchor="middle" x="50%" y="50%" display="inherit">{{'No data
+No data
at assertString (test/extract_multiline.js:26:20)
at Context.<anonymous> (test/extract_multiline.js:35:9)
This is probably an easy fix (a matter of swapping greedy/ungreedy somewhere).
Rolling a new release without the changes from this pull request.
es. {{ $scope.myString || ('defaultString' | translate) }}