mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-28 01:55:38 -05:00
Merge pull request #3349 from ryang217/master
Add additional formatting tags to Tome popup
This commit is contained in:
commit
28d085f6d3
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue