mirror of
https://github.com/atom/atom.git
synced 2026-01-25 06:48:28 -05:00
21 lines
344 B
CoffeeScript
21 lines
344 B
CoffeeScript
fs = require 'fs'
|
|
|
|
tdoc = require 'docs/tdoc'
|
|
|
|
Browser = require 'browser'
|
|
|
|
module.exports =
|
|
class Docs extends Browser
|
|
window.resourceTypes.push 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
|