feat: add source hyperlinks + remove thin from-source.md

Every source reference now links to elixir-lang/elixir at commit f4e1b34.
122 hyperlinks across 11 topic files. Added PATTERN_COMPLETE sentinels.
Removed from-source.md (326 lines, shallow) — covered by existing files.
This commit is contained in:
Rodin
2026-04-30 14:43:56 -07:00
parent 9ff22d2eed
commit 5f62dd0bf1
13 changed files with 146 additions and 480 deletions
+9 -7
View File
@@ -214,7 +214,7 @@ end
## 3. `@moduledoc false` for Internal Modules
**Source:** `lib/phoenix/router/route.ex:5-7`
**Source:** [lib/phoenix/router/route.ex#L5](https://github.com/elixir-lang/elixir/blob/f4e1b34617ef92052b65781f18eae5b88a490098/lib/phoenix/router/route.ex#L5)
```elixir
# This module defines the Route struct that is used
@@ -289,7 +289,7 @@ end
## 4. Struct Definition Conventions
**Source:** `lib/elixir/lib/task.ex:279-296`
**Source:** [lib/elixir/lib/task.ex#L279](https://github.com/elixir-lang/elixir/blob/f4e1b34617ef92052b65781f18eae5b88a490098/lib/elixir/lib/task.ex#L279)
```elixir
@enforce_keys [:mfa, :owner, :pid, :ref]
@@ -303,7 +303,7 @@ defstruct @enforce_keys
}
```
**Source:** `lib/phoenix/router/route.ex:30-46`
**Source:** [lib/phoenix/router/route.ex#L30](https://github.com/elixir-lang/elixir/blob/f4e1b34617ef92052b65781f18eae5b88a490098/lib/phoenix/router/route.ex#L30)
```elixir
defstruct [
@@ -389,14 +389,14 @@ end
## 5. Selective Imports in `__using__`
**Source:** `lib/phoenix/channel.ex:463-464`
**Source:** [lib/phoenix/channel.ex#L463](https://github.com/elixir-lang/elixir/blob/f4e1b34617ef92052b65781f18eae5b88a490098/lib/phoenix/channel.ex#L463)
```elixir
import unquote(__MODULE__)
import Phoenix.Socket, only: [assign: 3, assign: 2]
```
**Source:** `lib/phoenix/router.ex:271-275`
**Source:** [lib/phoenix/router.ex#L271](https://github.com/elixir-lang/elixir/blob/f4e1b34617ef92052b65781f18eae5b88a490098/lib/phoenix/router.ex#L271)
```elixir
import Phoenix.Router
@@ -471,7 +471,7 @@ end
## 6. Alias at Module Scope for Readability
**Source:** `lib/phoenix/router.ex:268`
**Source:** [lib/phoenix/router.ex#L268](https://github.com/elixir-lang/elixir/blob/f4e1b34617ef92052b65781f18eae5b88a490098/lib/phoenix/router.ex#L268)
```elixir
alias Phoenix.Router.{Resource, Scope, Route, Helpers}
@@ -538,7 +538,7 @@ end
## 7. Boolean-Suffixed Fields in Structs
**Source:** `lib/phoenix/router/route.ex:43-44`
**Source:** [lib/phoenix/router/route.ex#L43](https://github.com/elixir-lang/elixir/blob/f4e1b34617ef92052b65781f18eae5b88a490098/lib/phoenix/router/route.ex#L43)
```elixir
:trailing_slash?,
@@ -589,3 +589,5 @@ defstruct [:user, :admin?, :count]
```
**Why:** The `?` suffix should only mark genuine booleans. Using it on non-boolean fields creates confusion about the field's type and breaks the convention's usefulness as a type signal.
<!-- PATTERN_COMPLETE -->