Merge branch 'bzr/golem' of /Users/distler/Sites/code/instiki
This commit is contained in:
commit
c102e10315
|
@ -23,15 +23,22 @@ function fixRunIn() {
|
|||
// work around lack of gecko support for display:run-in
|
||||
var re = /^num_|\s+num_|^un_|\s+un_|proof/;
|
||||
$$('div > h6').each(function(element) {
|
||||
if(re.test($(element.parentNode).className)) {
|
||||
next_p = element.next('p');
|
||||
if(re.test($(element.parentNode).className)) {
|
||||
var new_span = new Element('span').update(element.textContent);
|
||||
new_span.addClassName('theorem_label');
|
||||
var next_el = element.next().firstChild;
|
||||
next_el.parentNode.insertBefore(new_span, next_el);
|
||||
var period = new Element('span').update('. ');
|
||||
next_el.parentNode.insertBefore(period, next_el);
|
||||
element.remove();
|
||||
}
|
||||
if (next_p) {
|
||||
var next_el = next_p.firstChild;
|
||||
next_p.insertBefore(new_span, next_el);
|
||||
next_p.insertBefore(period, next_el);
|
||||
element.remove();
|
||||
} else {
|
||||
var p = new Element('p').update(new_span);
|
||||
p.appendChild(period);
|
||||
element.replace(p);
|
||||
}
|
||||
}
|
||||
});
|
||||
// add tombstone to proof, since gecko doesn't support :last-child properly
|
||||
$$('div.proof').each(function(element) {
|
||||
|
|
Loading…
Reference in a new issue