TextRenderer.js (514B)
1 /** 2 * TextRenderer 3 * returns only the textual part of the token 4 */ 5 module.exports = class TextRenderer { 6 // no need for block level renderers 7 strong(text) { 8 return text; 9 } 10 11 em(text) { 12 return text; 13 } 14 15 codespan(text) { 16 return text; 17 } 18 19 del(text) { 20 return text; 21 } 22 23 html(text) { 24 return text; 25 } 26 27 text(text) { 28 return text; 29 } 30 31 link(href, title, text) { 32 return '' + text; 33 } 34 35 image(href, title, text) { 36 return '' + text; 37 } 38 39 br() { 40 return ''; 41 } 42 };