We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 87317f2 commit ff314f9Copy full SHA for ff314f9
src/compiler/crystal/tools/doc/generator.cr
@@ -19,8 +19,8 @@ class Crystal::Doc::Generator
19
@base_dir = `pwd`.chomp
20
@types = {} of Crystal::Type => Doc::Type
21
@repo_name = ""
22
+ @is_crystal_repo = false
23
compute_repository
- @is_crystal_repo = @repo_name == "github.com/crystal-lang/crystal"
24
end
25
26
def run
@@ -283,6 +283,8 @@ class Crystal::Doc::Generator
283
284
github_remote_pattern = /github\.com(?:\:|\/)((?:\w|-|_)+)\/((?:\w|-|_|\.)+)/
285
github_remotes = remotes.lines.select &.match(github_remote_pattern)
286
+ @is_crystal_repo = github_remotes.any? { |gr| gr =~ %r{github\.com[/:]crystal-lang/crystal} }
287
+
288
remote = github_remotes.find(&.starts_with?("origin")) || github_remotes.first?
289
return unless remote
290
0 commit comments