forked from Botanical/BotanJS
Astro Classes
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
(function()
|
||||
{
|
||||
var ns = __namespace( "Astro.Blog.AstroEdit.Visualizer.Snippet" );
|
||||
|
||||
var escapeStr = function ( str )
|
||||
{
|
||||
return str.replace( /\[/g, "[" ).replace( /\]/g, "]" );
|
||||
};
|
||||
|
||||
var compileProp = function ( _iDOM, keys )
|
||||
{
|
||||
var i, j = "", k;
|
||||
for (i in keys)
|
||||
{
|
||||
if( ( k = _iDOM.getDAttribute(keys[i]) ) )
|
||||
{
|
||||
j += " " + keys[i] + "=\"" + k + "\"";
|
||||
}
|
||||
}
|
||||
return j;
|
||||
};
|
||||
|
||||
ns[ NS_EXPORT ]( EX_FUNC, "escapeStr", escapeStr );
|
||||
ns[ NS_EXPORT ]( EX_FUNC, "compileProp", compileProp );
|
||||
})();
|
||||
Reference in New Issue
Block a user