Files
atom/extensions/docs/docs.coffee
Chris Wanstrath 7fff476a62 Merge remote-tracking branch 'origin/router'
Conflicts:
	src/atom/project.coffee
2011-11-28 20:09:41 -08:00

21 lines
334 B
CoffeeScript

fs = require 'fs'
tdoc = require 'docs/tdoc'
Browser = require 'browser'
module.exports =
class Docs extends Browser
atom.router.add this
running: true
open: (url) ->
return false if not url
if match = url.match /^docs:\/\/(.+)/
@url = url
code = fs.read match[1]
@show tdoc.html code
true