Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 0597034

Browse files
committed
rename textMarkup to markup
1 parent 1e1c8c8 commit 0597034

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/Angular.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var consoleNode,
1818
slice = Array.prototype.slice,
1919
error = window['console'] ? bind(window['console'], window['console']['error'] || noop) : noop,
2020
angular = window['angular'] || (window['angular'] = {}),
21-
angularTextMarkup = extensionMap(angular, 'textMarkup'),
21+
angularTextMarkup = extensionMap(angular, 'markup'),
2222
angularAttrMarkup = extensionMap(angular, 'attrMarkup'),
2323
angularDirective = extensionMap(angular, 'directive'),
2424
angularWidget = extensionMap(angular, 'widget', lowercase),

src/Compiler.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ Template.prototype = {
6969
///////////////////////////////////
7070
//Compiler
7171
//////////////////////////////////
72-
function Compiler(textMarkup, attrMarkup, directives, widgets){
73-
this.textMarkup = textMarkup;
72+
function Compiler(markup, attrMarkup, directives, widgets){
73+
this.markup = markup;
7474
this.attrMarkup = attrMarkup;
7575
this.directives = directives;
7676
this.widgets = widgets;
@@ -158,7 +158,7 @@ Compiler.prototype = {
158158
// process markup for text nodes only
159159
eachTextNode(element, function(textNode){
160160
var text = textNode.text();
161-
foreach(self.textMarkup, function(markup){
161+
foreach(self.markup, function(markup){
162162
markup.call(selfApi, text, textNode, element);
163163
});
164164
});

test/CompilerSpec.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
describe('compiler', function(){
2-
var compiler, textMarkup, directives, widgets, compile, log;
2+
var compiler, markup, directives, widgets, compile, log;
33

44
beforeEach(function(){
55
log = "";
@@ -20,10 +20,10 @@ describe('compiler', function(){
2020
}
2121

2222
};
23-
textMarkup = [];
23+
markup = [];
2424
attrMarkup = [];
2525
widgets = extensionMap({}, 'widget');
26-
compiler = new Compiler(textMarkup, attrMarkup, directives, widgets);
26+
compiler = new Compiler(markup, attrMarkup, directives, widgets);
2727
compile = function(html){
2828
var e = jqLite("<div>" + html + "</div>");
2929
var scope = compiler.compile(e)(e);
@@ -94,7 +94,7 @@ describe('compiler', function(){
9494
});
9595

9696
it('should process markup before directives', function(){
97-
textMarkup.push(function(text, textNode, parentNode) {
97+
markup.push(function(text, textNode, parentNode) {
9898
if (text == 'middle') {
9999
expect(textNode.text()).toEqual(text);
100100
parentNode.attr('hello', text);
@@ -126,7 +126,7 @@ describe('compiler', function(){
126126
this.directives(true);
127127
return noop;
128128
};
129-
textMarkup.push(function(text, textNode, parent){
129+
markup.push(function(text, textNode, parent){
130130
if (text == '{{1+2}}')
131131
parent.text('3');
132132
});

0 commit comments

Comments
 (0)