mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
Marko v3: Added support for <html-comment>
This commit is contained in:
parent
e83fa8b7e1
commit
2096e47668
@ -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');
|
||||||
|
|||||||
24
taglibs/html/html-comment-tag.js
Normal file
24
taglibs/html/html-comment-tag.js
Normal 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('-->');
|
||||||
|
};
|
||||||
6
taglibs/html/marko-taglib.json
Normal file
6
taglibs/html/marko-taglib.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"taglib-id": "marko-html",
|
||||||
|
"<html-comment>": {
|
||||||
|
"renderer": "./html-comment-tag.js"
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user