##// END OF EJS Templates
tweak history prefix search (up/^p) in qtconsole...
tweak history prefix search (up/^p) in qtconsole moving the cursor around the line could result in weird inconsistencies in the prefix. This simplifies the logic by always using the cursor position to set the history prefix, and better determine when the history prefix has actually changed.

File last commit:

r8053:58574fbf
r9205:ef8c14cd
Show More
testProcessingInstructions.js
16 lines | 719 B | application/javascript | JavascriptLexer
/ IPython / frontend / html / notebook / static / codemirror / mode / xquery / test / testProcessingInstructions.js
Matthias BUSSONNIER
update CodeMirror2 to 2.32
r8053 $(document).ready(function(){
module("testProcessingInstructions");
test("testProcessingInstructions", function() {
expect(1);
var input = 'data(<?target content?>) instance of xs:string';
var expected = '<span class="cm-variable cm-def">data</span>(<span class="cm-comment cm-meta">&lt;?target content?&gt;</span>) <span class="cm-keyword">instance</span> <span class="cm-keyword">of</span> <span class="cm-atom">xs:string</span>';
$("#sandbox").html('<textarea id="editor">' + input + '</textarea>');
var editor = CodeMirror.fromTextArea($("#editor")[0]);
var result = $(".CodeMirror-lines div div pre")[0].innerHTML;
equal(result, expected);
$("#editor").html("");
});
});