(string, options)
| 69 | @return {String} |
| 70 | */ |
| 71 | render(string, options) { |
| 72 | let indent = (options && options.indent) || ''; |
| 73 | let input = this.markdown.render(string); |
| 74 | let styles = Object.keys(this.tokens); |
| 75 | |
| 76 | input = input.replace(/^/gm, indent); |
| 77 | styles.reverse().map((style) => { |
| 78 | input = input.replace(this.tokens[style].pattern, this.tokens[style].render); |
| 79 | }); |
| 80 | input = input.replace(/~\^(.*)~\^/g, escapeToken); |
| 81 | return input; |
| 82 | } |
| 83 | |
| 84 | /* |
| 85 | Generate default style tokens |
no outgoing calls
no test coverage detected