This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ModuleA = require('module-a'); | |
var ModuleB = require('module-b'); | |
var A = new ModuleA("A"), | |
B = new ModuleB("B"); | |
A.foo() // => "foo" | |
A.bar() // => [error] | |
A.getName() // => "A" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
description = file.description.clone | |
@glossary.each do |w| | |
terms = w.name.split(',') | |
terms.each do |term| | |
term = Regexp.escape(term.strip).gsub('\ ', '\s+') | |
description.gsub!(/(\b#{term}\b)/i, "<acronym rel=\"#{w.id}\">\\1</acronym>") | |
end | |
end |