Fixing markup defs to conform to new OK event style
This commit is contained in:
@@ -58,12 +58,12 @@ var ASCIIDoc = {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
OK: function( res ) {
|
OK: function( res ) {
|
||||||
|
var h = '';
|
||||||
if ( res['text'] && res['href'] ) {
|
if ( res['text'] && res['href'] ) {
|
||||||
return res['href'] + '[' +
|
h = res['href'] + '[' +
|
||||||
res['text'] + ']';
|
res['text'] + ']';
|
||||||
}
|
}
|
||||||
else
|
$.GollumEditor.replaceSelection( h );
|
||||||
return '';
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -89,11 +89,12 @@ var ASCIIDoc = {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
OK: function( res ) {
|
OK: function( res ) {
|
||||||
|
var h = '';
|
||||||
if ( res['url'] && res['alt'] ) {
|
if ( res['url'] && res['alt'] ) {
|
||||||
return 'image::' + res['url'] +
|
h = 'image::' + res['url'] +
|
||||||
'[' + res['alt'] + ']';
|
'[' + res['alt'] + ']';
|
||||||
} else
|
}
|
||||||
return '';
|
$.GollumEditor.replaceSelection( h );
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -101,8 +102,6 @@ var ASCIIDoc = {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// this is necessary for GollumEditor to pick this up
|
|
||||||
jQuery.GollumEditor.defineLanguage('asciidoc', ASCIIDoc);
|
jQuery.GollumEditor.defineLanguage('asciidoc', ASCIIDoc);
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -56,12 +56,9 @@ var Creole = {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
OK: function( res ) {
|
OK: function( res ) {
|
||||||
if ( res['text'] && res['href'] ) {
|
var h = '[[' + res['href'] + '|' +
|
||||||
return '[[' + res['href'] + '|' +
|
|
||||||
res['text'] + ']]';
|
res['text'] + ']]';
|
||||||
}
|
$.GollumEditor.replaceSelection( h );
|
||||||
else
|
|
||||||
return '';
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -92,9 +89,8 @@ var Creole = {
|
|||||||
if ( res['alt'] != '' ) {
|
if ( res['alt'] != '' ) {
|
||||||
h += '|' + res['alt'] + '}}';
|
h += '|' + res['alt'] + '}}';
|
||||||
}
|
}
|
||||||
return h;
|
}
|
||||||
} else
|
$.GollumEditor.replaceSelection( h );
|
||||||
return '';
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,12 +76,12 @@ var MarkDown = {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
OK: function( res ) {
|
OK: function( res ) {
|
||||||
|
var rep = '';
|
||||||
if ( res['text'] && res['href'] ) {
|
if ( res['text'] && res['href'] ) {
|
||||||
return '[' + res['text'] + ']('
|
rep = '[' + res['text'] + ']('
|
||||||
+ res['href'] + ')';
|
+ res['href'] + ')';
|
||||||
}
|
}
|
||||||
else
|
$.GollumEditor.replaceSelection( rep );
|
||||||
return '';
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -118,8 +118,6 @@ var MarkDown = {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// this is necessary for GollumEditor to pick this up
|
|
||||||
jQuery.GollumEditor.defineLanguage('markdown', MarkDown);
|
jQuery.GollumEditor.defineLanguage('markdown', MarkDown);
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|||||||
@@ -60,12 +60,12 @@ var Textile = {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
OK: function( res ) {
|
OK: function( res ) {
|
||||||
|
var h = '';
|
||||||
if ( res['text'] && res['href'] ) {
|
if ( res['text'] && res['href'] ) {
|
||||||
return '"' + res['text'] + '":' +
|
h = '"' + res['text'] + '":' +
|
||||||
res['href'];
|
res['href'];
|
||||||
}
|
}
|
||||||
else
|
$.GollumEditor.replaceSelection( h );
|
||||||
return '';
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -97,7 +97,7 @@ var Textile = {
|
|||||||
h += '(' + res['alt'] + ')';
|
h += '(' + res['alt'] + ')';
|
||||||
}
|
}
|
||||||
h += '!';
|
h += '!';
|
||||||
return h;
|
%.GollumEditor.replaceSelection( h );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user