(name, attrs, selfclosing)
| 2322 | |
| 2323 | // Helper function to produce an HTML tag. |
| 2324 | function tag(name, attrs, selfclosing) { |
| 2325 | if (this.disableTags > 0) { |
| 2326 | return; |
| 2327 | } |
| 2328 | this.buffer += ('<' + name); |
| 2329 | if (attrs && attrs.length > 0) { |
| 2330 | var i = 0; |
| 2331 | var attrib; |
| 2332 | while ((attrib = attrs[i]) !== undefined) { |
| 2333 | this.buffer += (' ' + attrib[0] + '="' + attrib[1] + '"'); |
| 2334 | i++; |
| 2335 | } |
| 2336 | } |
| 2337 | if (selfclosing) { |
| 2338 | this.buffer += ' /'; |
| 2339 | } |
| 2340 | this.buffer += '>'; |
| 2341 | this.lastOut = '>'; |
| 2342 | } |
| 2343 | |
| 2344 | |
| 2345 | function HtmlRenderer(options) { |
no test coverage detected