History

Improve 'guides' type detection

Thibaut Courouble committed 10 years ago

Commit 616ea9d1 parent ebc6be31 file · +1 −1Browse files

Unified · Split

assets/javascripts/collections/types.coffee+1−1
@@ -7,7 +7,7 @@ class app.collections.Types extends app.Collection · 6 unmodified lines
7 (result[@_groupFor(type)] ||= []).push(type)7 (result[@_groupFor(type)] ||= []).push(type)
8 result.filter (e) -> e.length > 08 result.filter (e) -> e.length > 0
9 9
10 GUIDES_RGX = /(^|[\s\(])(guide|tutorial|reference|getting\ started)/i10 GUIDES_RGX = /(^|[\s\(])(guide|guides|tutorial|reference|getting\ started)($|[\s\):])/i
11 11
12 _groupFor: (type) ->12 _groupFor: (type) ->
13 if GUIDES_RGX.test(type.name)13 if GUIDES_RGX.test(type.name)