Merge pull request #3349 from ryang217/master

Add additional formatting tags to Tome popup
This commit is contained in:
Rob Blanckaert 2016-01-22 13:22:56 -08:00
commit 28d085f6d3

View file

@ -154,7 +154,10 @@ module.exports = class DocFormatter
content = popoverTemplate doc: @doc, docName: docName, language: @options.language, value: @formatValue(), marked: marked, argumentExamples: argumentExamples, writable: @options.writable, selectedMethod: @options.selectedMethod, cooldowns: @inferCooldowns(), item: @options.item content = popoverTemplate doc: @doc, docName: docName, language: @options.language, value: @formatValue(), marked: marked, argumentExamples: argumentExamples, writable: @options.writable, selectedMethod: @options.selectedMethod, cooldowns: @inferCooldowns(), item: @options.item
owner = if @doc.owner is 'this' then @options.thang else window[@doc.owner] owner = if @doc.owner is 'this' then @options.thang else window[@doc.owner]
content = @replaceSpriteName content content = @replaceSpriteName content
content.replace /\#\{(.*?)\}/g, (s, properties) => @formatValue downTheChain(owner, properties.split('.')) content = content.replace /\#\{(.*?)\}/g, (s, properties) => @formatValue downTheChain(owner, properties.split('.'))
content = content.replace /{([a-z]+)}([^]*?){\/\1}/g, (s, language, text) =>
if language is @options.language then return text
return ''
replaceSpriteName: (s) -> replaceSpriteName: (s) ->
# Prefer type, and excluded the quotes we'd get with @formatValue # Prefer type, and excluded the quotes we'd get with @formatValue