Sha256: a1116290f68eadb2ab6d17f6ae09c97c2cae27e87230533d1d7817759e9fc7d5
Contents?: true
Size: 296 Bytes
Versions: 8
Compression:
Stored size: 296 Bytes
Contents
module MiniSyntax module Highlighter module YAML def self.highlight(code) code.gsub! /^( )*([a-z_-]+:)/, "\\1<b>\\2</b>" code.gsub! /(\#([^\{].*?)?)\n/, "<i>\\1</i>\n" code end end end end MiniSyntax.register(:yaml, MiniSyntax::Highlighter::YAML)
Version data entries
8 entries across 8 versions & 1 rubygems