Skip to content

Commit 6efb478

Browse files
committed
Fixes #72
1 parent 216fd6b commit 6efb478

File tree

2 files changed

+1
-20
lines changed

2 files changed

+1
-20
lines changed

src/ast.js

+1-12
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,6 @@ class AstSerializer {
9696
// controls whether the assets are aggregated
9797
this.bundlerMode = false;
9898

99-
// controls whether @html, <template webc:type>, <* webc:is="template" webc:type> nodes are reprocessed
100-
this.reprocessingMode = true;
101-
10299
// for error messaging
103100
this.filePath = Path.normalizePath(filePath);
104101

@@ -214,10 +211,6 @@ class AstSerializer {
214211
setBundlerMode(mode) {
215212
this.bundlerMode = !!mode;
216213
}
217-
218-
setReprocessingMode(mode) {
219-
this.reprocessingMode = !!mode;
220-
}
221214

222215
setAliases(aliases = {}) {
223216
this.aliases = aliases;
@@ -939,16 +932,12 @@ class AstSerializer {
939932
* @private
940933
*/
941934
async compileString(rawContent, node, slots, options) {
942-
if(!this.reprocessingMode) {
943-
return rawContent;
944-
}
945-
946935
if(typeof rawContent !== "string") {
947936
rawContent = `${rawContent}`;
948937
}
949938

950939
// Short circuit if rawContent has no < for tags
951-
if(!rawContent.includes("<") || this.hasAttribute(node, AstSerializer.attrs.RAW)) {
940+
if(this.hasAttribute(node, AstSerializer.attrs.RAW) || !rawContent.includes("<")) {
952941
return rawContent;
953942
}
954943

webc.js

-8
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ class WebC {
3535
this.globalComponents = {};
3636
this.astOptions = {};
3737
this.bundlerMode = false;
38-
this.reprocessingMode = true;
3938
this.ignores = options.ignores || [];
4039

4140
if(input || input === "") {
@@ -204,7 +203,6 @@ class WebC {
204203

205204
let ast = new AstSerializer(this.astOptions);
206205
ast.setBundlerMode(this.bundlerMode);
207-
ast.setReprocessingMode(this.reprocessingMode);
208206
ast.setMode(mode);
209207
ast.setContent(content);
210208
ast.setData(options.data);
@@ -244,12 +242,6 @@ class WebC {
244242
this.bundlerMode = !!mode;
245243
}
246244

247-
// @deprecated, remove in 0.8.0
248-
// https://github.com/11ty/webc/issues/72
249-
setReprocessingMode(mode) {
250-
this.reprocessingMode = !!mode;
251-
}
252-
253245
async stream(options = {}) {
254246
let { ast, serializer } = await this.setup(options);
255247

0 commit comments

Comments
 (0)