Sha256: 0292e96d018f4a919e9cd51769f22c3db6bf9057ff8a4b49eef389034cc3f2a8
Contents?: true
Size: 718 Bytes
Versions: 19
Compression:
Stored size: 718 Bytes
Contents
FS = require 'fs' Path = require 'path' Entities = require '../_entities' Markdown = require '../tools/markdown' module.exports = class Entities.Extra @name: "Extra" constructor: (@environment, @path) -> @name = Path.relative(@environment.options.basedir, @path) @content = FS.readFileSync @path, 'utf-8' if @environment.options.debug Winston.info "Creating new Extra Entity" Winston.info " name: " + @name Winston.info " content: " + @content @parsed = if /\.(markdown|md)$/.test @path Markdown.convert(@content) else "<p>"+@content.replace(/\n/g, '<br/>')+"</p>" linkify: -> inspect: -> { path: @path, parsed: @parsed }
Version data entries
19 entries across 19 versions & 1 rubygems