Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #9 from IlanFrumer/master

fixed some issues
  • Loading branch information...
commit f7a137834d9f4b7a6b0bcb125dcbecd1239d8820 2 parents 03e8169 + bbc5bc2
@mustardamus mustardamus authored
View
9 app/assets/javascripts/entry.js.coffee
@@ -82,10 +82,15 @@ class jqapi.Entry
joinArr = [] # generate the comma seperated string with join
for arg in argsArr
- joinArr.push arg.name if arg and arg.name # push argument name to join array
+ comma = ""
+ comma = ", " unless joinArr.length is 0
+ if arg and arg.optional
+ joinArr.push "[#{comma}#{arg.name}]" if arg and arg.name
+ else
+ joinArr.push "#{comma}#{arg.name}" if arg and arg.name
methodName = title.substr(0, title.length - 2) # cut out the empty ()
- sigTitle = "#{methodName}(#{joinArr.join(', ')})" # and fill it with arguments
+ sigTitle = "#{methodName}(#{joinArr.join(' ')})" # and fill it with arguments
sigTitle # return full title
View
10 app/assets/javascripts/header.js.coffee
@@ -43,8 +43,14 @@ class jqapi.Header
joinArr = []
for arg in argsArr
- joinArr.push arg.name if arg and arg.name
+ comma = ""
+ comma = ", " unless joinArr.length is 0
+ if arg and arg.optional
+ joinArr.push "[#{comma}#{arg.name}]" if arg and arg.name
+ else
+ joinArr.push "#{comma}#{arg.name}" if arg and arg.name
+
+ retArr.push joinArr.join(' ')
- retArr.push joinArr.join(', ')
retArr
View
9 tasks/documentation.thor
@@ -62,6 +62,15 @@ class Docs < Thor
Dir.glob("#{xmlPath}/*.xml").each do |filepath| # each .xml file in directory
contentXml = File.open(filepath).read # read the xml content of the file
+
+ regex = /<xi:include href="(.+?)".+>/ # including xml xi:include tags
+ contentXml = contentXml.gsub regex do
+ icontentXml = File.open("#{xmlPath}/#{$1}").read
+ reg = /<\?xml.*\?>/
+ icontentXml = icontentXml.gsub reg , ''
+ icontentXml
+ end
+
contentObj = Crack::XML.parse(contentXml) # parse xml to a object
filename = filepath.split('/').last.gsub('.xml', '') # get the filename (-selector variation for example)
entryObj = {} # will hold entry details, written to file as json
Please sign in to comment.
Something went wrong with that request. Please try again.