History

Update Moment.js documentation (2.11.1)

Thibaut committed 10 years ago

Commit b0526c71 parent b0a55c43 files · +6 −4Browse files

Showing the changes to lib/docs (2 of 3 files). Show all

Unified · Split

2 files
  1. lib/docs/filters/moment/entries.rb +3 −1
  2. lib/docs/scrapers/moment.rb +2 −2
lib/docs/filters/moment/entries.rb+3−1
@@ -22,8 +22,10 @@ module Docs · 21 unmodified lines
22 22
23 if node['id'] == 'utilities-invalid' # bug fix23 if node['id'] == 'utilities-invalid' # bug fix
24 name = 'moment.invalid()'24 name = 'moment.invalid()'
25 elsif node['id'] == 'customization-now'
26 name = 'moment.now'
25 elsif %w(Display Durations Get\ +\ Set i18n Manipulate Query Utilities).include?(type) ||27 elsif %w(Display Durations Get\ +\ Set i18n Manipulate Query Utilities).include?(type) ||
26 %w(parsing-is-valid parsing-parse-zone parsing-unix-timestamp parsing-utc customization-relative-time-threshold).include?(node['id'])28 %w(parsing-is-valid parsing-parse-zone parsing-unix-timestamp parsing-utc parsing-creation-data customization-relative-time-threshold).include?(node['id'])
27 name = node.next_element.content[/moment(?:\(.*?\))?\.(?:duration\(\)\.)?\w+/]29 name = node.next_element.content[/moment(?:\(.*?\))?\.(?:duration\(\)\.)?\w+/]
28 name.sub! %r{\(.*?\)\.}, '#'30 name.sub! %r{\(.*?\)\.}, '#'
29 name << '()'31 name << '()'
lib/docs/scrapers/moment.rb+2−2
@@ -3,7 +3,7 @@ module Docs · 2 unmodified lines
3 self.name = 'Moment.js'3 self.name = 'Moment.js'
4 self.slug = 'moment'4 self.slug = 'moment'
5 self.type = 'moment'5 self.type = 'moment'
6 self.version = '2.10.2'6 self.version = '2.11.1'
7 self.base_url = 'http://momentjs.com/docs/'7 self.base_url = 'http://momentjs.com/docs/'
8 8
9 html_filters.push 'moment/clean_html', 'moment/entries', 'title'9 html_filters.push 'moment/clean_html', 'moment/entries', 'title'
@@ -13,7 +13,7 @@ module Docs · 3 unmodified lines
13 options[:skip_links] = true13 options[:skip_links] = true
14 14
15 options[:attribution] = <<-HTML15 options[:attribution] = <<-HTML
16 &copy; 2011&ndash;2015 Tim Wood, Iskren Chernev, Moment.js contributors<br>16 &copy; 2011&ndash;2016 Tim Wood, Iskren Chernev, Moment.js contributors<br>
17 Licensed under the MIT License.17 Licensed under the MIT License.
18 HTML18 HTML
19 end19 end