Are you saying my CSS was
still too complicated? I tried to make it even simpler than it was
:'D
But anyway, thank you Matt
:D :D
(except I realise I forgot to include the 1px offset to nudge the emote images down a bit, but I dunno if it'd even work with Beehive. I also borrowed Beehive's inner <span> trick to show the text representation of the emote if CSS isn't available
:$ )
Incidentally, how do I post code that contains the <code> tag? e.g. like this only with actual < instead of <
JavaScript code:
var codify = function(inp) {
// Wraps 'inp' in <code> tags
return ["<code>", inp, "</code>"].join("");
};
If the < are changed to a <, it gets all confused and closes the tag early:
JavaScript code:
", inp, "
"].join("");
};
Seems ok with other tags:
JavaScript code:
var headify = function(inp) {
// Wraps 'inp' in <h1> tags
return ["<h1>", inp, "</h1>"].join("");
};
Edit: I guess it's a tricky thing to solve, cos you'd have to keep track of all <code> and </code> and only treat the outermost ones as actual tags.
EDITED: 12 Dec 2010 22:55 by CAER