(block)
| 1243 | |
| 1244 | // Attempt to parse an autolink (URL or email in pointy brackets). |
| 1245 | var parseAutolink = function(block) { |
| 1246 | var m; |
| 1247 | var dest; |
| 1248 | var node; |
| 1249 | if ((m = this.match(reEmailAutolink))) { |
| 1250 | dest = m.slice(1, m.length - 1); |
| 1251 | node = new Node('link'); |
| 1252 | node._destination = normalizeURI('mailto:' + dest); |
| 1253 | node._title = ''; |
| 1254 | node.appendChild(text(dest)); |
| 1255 | block.appendChild(node); |
| 1256 | return true; |
| 1257 | } else if ((m = this.match(reAutolink))) { |
| 1258 | dest = m.slice(1, m.length - 1); |
| 1259 | node = new Node('link'); |
| 1260 | node._destination = normalizeURI(dest); |
| 1261 | node._title = ''; |
| 1262 | node.appendChild(text(dest)); |
| 1263 | block.appendChild(node); |
| 1264 | return true; |
| 1265 | } else { |
| 1266 | return false; |
| 1267 | } |
| 1268 | }; |
| 1269 | |
| 1270 | // Attempt to parse a raw HTML tag. |
| 1271 | var parseHtmlTag = function(block) { |
nothing calls this directly
no test coverage detected