mirror of
https://github.com/atom/atom.git
synced 2026-02-09 14:15:24 -05:00
16 lines
291 B
CoffeeScript
16 lines
291 B
CoffeeScript
module.exports =
|
|
class Text
|
|
constructor: (@string, @raw=false) ->
|
|
|
|
toHtml: ->
|
|
if @raw
|
|
@string
|
|
else
|
|
@string
|
|
.replace(/&/g, '&')
|
|
.replace(/"/g, '"')
|
|
.replace(/'/g, ''')
|
|
.replace(/</g, '<')
|
|
.replace(/>/g, '>')
|
|
|