In an edit diff (view "Inline"), when the revision changes the title, removed words are shown struck out in red and added words are shown with a green background. This is fine when there are only removed words, or only added words, but when there are both, the result is difficult to read.

title with edited words

Getting default accessible fields of… No. Getting accessible fields of an object in a Salesforce object… No. Getting accessible fields of a Salesforce object using REST API. Phew. Yeah, ok.

title with edited words

Program causes run. Time error? Oh, Program causes run-time error … when run on specific machine. Yeah, sounds sensible. What was the old title? Oh dear…

Please show both the old title and the new title, one below the other.


2 Answers 2


Considering that titles get re-written a lot AND that carefully worded titles make a big difference, the seeing the whole title at once is actually quite important.

I too would like to see the diff for edits styled in such a way that the old and new question titles show up separately in the same way that the question bodies do. The current rendering of titles being an inline diff and the post body being separate is inconsistent.

The added and deleted words can still be highlighted in the appropriate one (red for deleted words in the old title and green for added ones in the new), but each title should be readable from start to finish as a single unit.


I've made a userscript to do this. It gets the new and old content and puts them in place of the old annoying view:

From this: enter image description here To this: enter image description here

(not the best example - but it's not my fault nobody's suggesting any title edits! I'll add a more complex example as soon as I see one)

You can get this on the development version with my SE Additional Optional Features userscript at StackApps.

The script:

// ==UserScript==
// @name         View title in diff-view
// @namespace    http://stackexchange.com/users/4337810/
// @version      1.0
// @description  Replaces the title in diff-view to a easier to understand view
// @author       ᔕᖺᘎᕊ (http://stackexchange.com/users/4337810/)
// @match        *://*.stackexchange.com/*
// @match        *://*.stackoverflow.com/*
// @match        *://*.superuser.com/*
// @match        *://*.serverfault.com/*
// @match        *://*.askubuntu.com/*
// @match        *://*.stackapps.com/*
// @match        *://*.mathoverflow.net/*
// @grant        none
// ==/UserScript==

setTimeout(function() {
    var $questionHyperlink = $('.summary h2 .question-hyperlink').clone(),
        $questionHyperlinkTwo = $('.summary h2 .question-hyperlink').clone(),
        link = $('.summary h2 .question-hyperlink').attr('href'),
        added = ($questionHyperlinkTwo.find('.diff-delete').remove().end().text()),
        removed = ($questionHyperlink.find('.diff-add').remove().end().text());

    $('.summary h2 .question-hyperlink').hide();
    $('.summary h2 .question-hyperlink').after("<a href='"+link+"' class='question-hyperlink'><span class='diff-delete'>"+removed+"</span><span class='diff-add'>"+added+"</span></a>");
}, 1000);

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .