Przeglądaj źródła

Changed: refactored `ViewConverterBuilder#fromAttribute()` so it does not use `#from()`.

Szymon Cofalik 8 lat temu
rodzic
commit
2190243c6e

+ 7 - 2
packages/ckeditor5-engine/src/conversion/buildviewconverter.js

@@ -151,9 +151,14 @@ class ViewConverterBuilder {
 			pattern.attribute[ key ] = value;
 		}
 
-		this.from( pattern );
+		const matcher = new Matcher( pattern );
 
-		this._from[ this._from.length - 1 ].attributeKey = key;
+		this._from.push( {
+			matcher: matcher,
+			consume: false,
+			priority: null,
+			attributeKey: key
+		} );
 
 		return this;
 	}