Marko v3: Added support for <html-comment>

This commit is contained in:
Patrick Steele-Idem 2016-01-19 16:18:54 -07:00
parent e83fa8b7e1
commit 2096e47668
6 changed files with 31 additions and 0 deletions

View File

@ -129,6 +129,7 @@ exports.builder = Builder.DEFAULT_BUILDER;
var taglibLookup = require('./taglib-lookup'); var taglibLookup = require('./taglib-lookup');
taglibLookup.registerTaglib(require.resolve('../taglibs/core/marko-taglib.json')); taglibLookup.registerTaglib(require.resolve('../taglibs/core/marko-taglib.json'));
taglibLookup.registerTaglib(require.resolve('../taglibs/layout/marko-taglib.json')); taglibLookup.registerTaglib(require.resolve('../taglibs/layout/marko-taglib.json'));
taglibLookup.registerTaglib(require.resolve('../taglibs/html/marko-taglib.json'));
/* /*
exports.Taglib = require('./Taglib'); exports.Taglib = require('./Taglib');

View File

@ -0,0 +1,24 @@
/*
* Copyright 2011 eBay Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
module.exports = function render(input, out) {
out.write('<!--');
if (input.renderBody) {
input.renderBody(out);
}
out.write('-->');
};

View File

@ -0,0 +1,6 @@
{
"taglib-id": "marko-html",
"<html-comment>": {
"renderer": "./html-comment-tag.js"
}
}