History

Update CoffeeScript documentation (1.7.1)

Thibaut committed 12 years ago

Commit 722a0451 parent 948e2673 files · +19 −5Browse files

Unified · Split

3 files
  1. assets/javascripts/templates/pages/about_tmpl.coffee +1 −1
  2. lib/docs/filters/coffeescript/entries.rb +16 −2
  3. lib/docs/scrapers/coffeescript.rb +2 −2
assets/javascripts/templates/pages/about_tmpl.coffee+1−1
@@ -85,7 +85,7 @@ credits = [ · 84 unmodified lines
8585 'https://raw.github.com/jashkenas/backbone/master/LICENSE'
8686 ], [
8787 'CoffeeScript',
88− '2009-2013 Jeremy Ashkenas',
88+ '2009-2014 Jeremy Ashkenas',
8989 'MIT',
9090 'https://raw.github.com/jashkenas/coffee-script/master/LICENSE'
9191 ], [
lib/docs/filters/coffeescript/entries.rb+16−2
@@ -13,12 +13,14 @@ module Docs · 12 unmodified lines
1313 ['... splats', 'splats', 'Language'],
1414 ['for...in', 'loops', 'Statements'],
1515 ['for...in...by', 'loops', 'Statements'],
16+ ['for...in...when', 'loops', 'Statements'],
1617 ['for...of', 'loops', 'Statements'],
1718 ['while', 'loops', 'Statements'],
1819 ['until', 'loops', 'Statements'],
1920 ['loop', 'loops', 'Statements'],
2021 ['do', 'loops', 'Statements'],
2122 ['Array slicing and splicing', 'slices', 'Language'],
23+ ['Ranges', 'slices', 'Language'],
2224 ['Expressions', 'expressions', 'Language'],
2325 ['?', 'the-existential-operator', 'Operators'],
2426 ['?=', 'the-existential-operator', 'Operators'],
@@ -35,8 +37,10 @@ module Docs · 10 unmodified lines
3537 ['Chained comparisons', 'comparisons', 'Language'],
3638 ['#{} interpolation', 'strings', 'Language'],
3739 ['Block strings', 'strings', 'Language'],
40+ ['"""', 'strings', 'Language'],
3841 ['Block comments', 'strings', 'Language'],
39− ['Block regular expressions', 'regexes', 'Language'],
42+ ['###', 'strings', 'Language'],
43+ ['Block regexes', 'regexes', 'Language'],
4044 ['cake command', 'cake', 'Miscellaneous'],
4145 ['Cakefile', 'cake', 'Miscellaneous'],
4246 ['Source maps', 'source-maps', 'Miscellaneous']
@@ -49,7 +53,8 @@ module Docs · 6 unmodified lines
4953 css('.definitions td:first-child > code').each do |node|
5054 node.content.split(', ').each do |name|
5155 next if %w(true false yes no on off this).include?(name)
52− id = name.parameterize
56+ name.sub! %r{\Aa (.+) b\z}, '\1'
57+ id = name_to_id(name)
5358 node['id'] = id
5459 entries << [name, id, 'Operators']
5560 end
@@ -57,6 +62,15 @@ module Docs · 1 unmodified line
5762
5863 entries
5964 end
65+
66+ def name_to_id(name)
67+ case name
68+ when '**' then 'pow'
69+ when '//' then 'floor'
70+ when '%%' then 'mod'
71+ else name.parameterize
72+ end
73+ end
6074 end
6175 end
6276 end
lib/docs/scrapers/coffeescript.rb+2−2
@@ -2,7 +2,7 @@ module Docs · 1 unmodified line
22 class Coffeescript < UrlScraper
33 self.name = 'CoffeeScript'
44 self.type = 'coffeescript'
5− self.version = '1.6.3'
5+ self.version = '1.7.1'
66 self.base_url = 'http://coffeescript.org'
77
88 html_filters.push 'coffeescript/clean_html', 'coffeescript/entries', 'title'
@@ -12,7 +12,7 @@ module Docs · 3 unmodified lines
1212 options[:skip_links] = true
1313
1414 options[:attribution] = <<-HTML
15− &copy; 2009&ndash;2013 Jeremy Ashkenas<br>
15+ &copy; 2009&ndash;2014 Jeremy Ashkenas<br>
1616 Licensed under the MIT License.
1717 HTML
1818 end