mirror of https://github.com/markedjs/marked
43 lines
503 B
JavaScript
43 lines
503 B
JavaScript
/**
|
|
* TextRenderer
|
|
* returns only the textual part of the token
|
|
*/
|
|
export class TextRenderer {
|
|
// no need for block level renderers
|
|
strong(text) {
|
|
return text;
|
|
}
|
|
|
|
em(text) {
|
|
return text;
|
|
}
|
|
|
|
codespan(text) {
|
|
return text;
|
|
}
|
|
|
|
del(text) {
|
|
return text;
|
|
}
|
|
|
|
html(text) {
|
|
return text;
|
|
}
|
|
|
|
text(text) {
|
|
return text;
|
|
}
|
|
|
|
link(href, title, text) {
|
|
return '' + text;
|
|
}
|
|
|
|
image(href, title, text) {
|
|
return '' + text;
|
|
}
|
|
|
|
br() {
|
|
return '';
|
|
}
|
|
}
|