3 var whitespace = require('is-whitespace-character');
4 var locate = require('../locate/delete');
6 module.exports = strikethrough;
7 strikethrough.locator = locate;
12 function strikethrough(eat, value, silent) {
24 value.charAt(0) !== C_TILDE ||
25 value.charAt(1) !== C_TILDE ||
26 whitespace(value.charAt(2))
32 length = value.length;
37 while (++index < length) {
38 character = value.charAt(index);
41 character === C_TILDE &&
42 previous === C_TILDE &&
43 (!preceding || !whitespace(preceding))
45 /* istanbul ignore if - never used (yet) */
50 return eat(DOUBLE + subvalue + DOUBLE)({
52 children: self.tokenizeInline(subvalue, now)