Skip to content

Commit 2c13e03

Browse files
committed
callback example fix
1 parent d75a09a commit 2c13e03

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

samples.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ <h2 class="page-header">callback</h2>
730730
callback: function(text) {
731731
console.warn('This warn is a callback: ' + text);
732732
},
733-
getPut: '.input-calback-preview'
733+
getPut: '.input-callback-preview'
734734
});
735735

736736
$('[data-spy="affix"]').affix({

tests/tests.js

+12
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ function setupBefore() {
44

55
function teardownAfter() {
66
$('#text').remove();
7+
$('#permalink').remove();
78
}
89

910
function fromToTest(preText, resultExpect, params) {
@@ -97,3 +98,14 @@ test( "“ and ” (Undefined chars)", function() {
9798

9899
fromToTest(preText, resultExpect);
99100
});
101+
102+
test( "callback don't bind", function() {
103+
var params = {
104+
callback: function(){console.log('callback as console');}
105+
};
106+
107+
var preText = "A text betweet quotes “ and ” are not going to be a problem!";
108+
var resultExpect = 'a-text-betweet-quotes-and-are-not-going-to-be-a-problem';
109+
110+
fromToTest(preText, resultExpect, params);
111+
});

0 commit comments

Comments
 (0)