Automatic package links

Thanks everyone for your input! Looks like we have a solid majority in favor, let’s try it out. Here’s what I’ve implemented (note that you may need to refresh to get the links):

This is a Julia issue: julia#265
These are Julia commits: julia@7327a8f, julia@72cd63ce28c50c8c72e009df03dfec608802450e
This is a package issue: JuliaStats/Distributions.jl#123
This is a registered package info page on JuliaHub: Distributions.jl
This is a GitHub package link: JuliaStats/Distributions.jl

If you see anything awry or have other suggestions, please make your voice known!

@Mason, just FYI, I added \bs to the beginning of these regexes, which isn’t how it’s configured on Zulip. It may help reduce some false positives, like someone writing path/to/src/SubModule/SubModule.jl without ``s.

I wonder if and/or how we could display these rules. Unlike Zulip, by default Discourse doesn’t display these to users (I don’t think). Anyhow, these are the rules as of right now (the component doesn’t support named groups):

/\b[jJ]ulia\#([0-9]+)/, https://github.com/JuliaLang/julia/issues/$1
/\bjulia@([0-9a-f]{4,40})/, https://github.com/JuliaLang/julia/commit/$1
/\b([a-zA-Z0-9_-]+)/([a-zA-Z0-9._-]+)#([0-9]+)/, https://github.com/$1/$2/issues/$3
/\b([A-Z][a-zA-Z0-9_-]+)(.jl)/, https://juliahub.com/ui/Packages/$1
/\b([a-zA-Z0-9_-]+)/([a-zA-Z0-9._-]+.jl)/, https://github.com/$1/$2
7 Likes