| @@ -13,12 +13,14 @@ module Docs · 12 unmodified lines |
| 13 | 13 | ['... splats', 'splats', 'Language'], |
| 14 | 14 | ['for...in', 'loops', 'Statements'], |
| 15 | 15 | ['for...in...by', 'loops', 'Statements'], |
| 16 | + ['for...in...when', 'loops', 'Statements'], |
| 16 | 17 | ['for...of', 'loops', 'Statements'], |
| 17 | 18 | ['while', 'loops', 'Statements'], |
| 18 | 19 | ['until', 'loops', 'Statements'], |
| 19 | 20 | ['loop', 'loops', 'Statements'], |
| 20 | 21 | ['do', 'loops', 'Statements'], |
| 21 | 22 | ['Array slicing and splicing', 'slices', 'Language'], |
| 23 | + ['Ranges', 'slices', 'Language'], |
| 22 | 24 | ['Expressions', 'expressions', 'Language'], |
| 23 | 25 | ['?', 'the-existential-operator', 'Operators'], |
| 24 | 26 | ['?=', 'the-existential-operator', 'Operators'], |
| @@ -35,8 +37,10 @@ module Docs · 10 unmodified lines |
| 35 | 37 | ['Chained comparisons', 'comparisons', 'Language'], |
| 36 | 38 | ['#{} interpolation', 'strings', 'Language'], |
| 37 | 39 | ['Block strings', 'strings', 'Language'], |
| 40 | + ['"""', 'strings', 'Language'], |
| 38 | 41 | ['Block comments', 'strings', 'Language'], |
| 39 | | − ['Block regular expressions', 'regexes', 'Language'], |
| 42 | + ['###', 'strings', 'Language'], |
| 43 | + ['Block regexes', 'regexes', 'Language'], |
| 40 | 44 | ['cake command', 'cake', 'Miscellaneous'], |
| 41 | 45 | ['Cakefile', 'cake', 'Miscellaneous'], |
| 42 | 46 | ['Source maps', 'source-maps', 'Miscellaneous'] |
| @@ -49,7 +53,8 @@ module Docs · 6 unmodified lines |
| 49 | 53 | css('.definitions td:first-child > code').each do |node| |
| 50 | 54 | node.content.split(', ').each do |name| |
| 51 | 55 | 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) |
| 53 | 58 | node['id'] = id |
| 54 | 59 | entries << [name, id, 'Operators'] |
| 55 | 60 | end |
| @@ -57,6 +62,15 @@ module Docs · 1 unmodified line |
| 57 | 62 | |
| 58 | 63 | entries |
| 59 | 64 | 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 |
| 60 | 74 | end |
| 61 | 75 | end |
| 62 | 76 | end |