* Prepares source. * * @return {string} HTML source.
()
| 94 | * @return {string} HTML source. |
| 95 | */ |
| 96 | parse() { |
| 97 | switch (this.type) { |
| 98 | // nothing to do |
| 99 | case exports.TYPES.HTML: |
| 100 | return this.content; |
| 101 | |
| 102 | // markdown |
| 103 | case exports.TYPES.MARKDOWN: |
| 104 | return markdown.getParser()(this.content); |
| 105 | |
| 106 | // uhm... should we react somehow? |
| 107 | // if not then this case can be merged with TYPES.HTML |
| 108 | default: |
| 109 | return this.content; |
| 110 | } |
| 111 | } |
| 112 | } |
| 113 | exports.Tutorial = Tutorial; |
| 114 |
no outgoing calls
no test coverage detected