mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-24 08:08:15 -05:00
Merge pull request #1338 from Darredevil/master
language sensitive docs added
This commit is contained in:
commit
c6656f1a2d
2 changed files with 15 additions and 2 deletions
|
@ -26,5 +26,8 @@ block content
|
|||
li(id="#{component.get('name')}#{doc.name}")
|
||||
| #{doc.name}
|
||||
ul.specialList
|
||||
li!=marked(doc.description)
|
||||
|
||||
if doc.description[language.substring(1,language.length-1)]
|
||||
li!=marked(doc.description[language.substring(1,language.length-1)])
|
||||
else
|
||||
li!=marked(doc.description)
|
||||
|
||||
|
|
|
@ -19,10 +19,20 @@ module.exports = class UnnamedView extends RootView
|
|||
onLoaded: ->
|
||||
console.log 'we have the components...', (c.get('name') for c in @componentDocs.models)
|
||||
console.log 'we have the attributes...', (c.attributes for c in @componentDocs.models)
|
||||
if (me.get('aceConfig')?.language?) is false
|
||||
console.log 'default language javascript'
|
||||
else
|
||||
console.log 'language is =', me.get('aceConfig').language
|
||||
|
||||
#console.log 'test', @componentDocs.models[99].attributes.propertyDocumentation[1].description['python']
|
||||
super()
|
||||
|
||||
getRenderData: ->
|
||||
c = super()
|
||||
c.components = @componentDocs.models
|
||||
c.marked = marked
|
||||
if (me.get('aceConfig')?.language?) is false
|
||||
c.language = 'javascript'
|
||||
else
|
||||
c.language = JSON.stringify(me.get('aceConfig').language)
|
||||
c
|
||||
|
|
Loading…
Reference in a new issue