You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The autolinking introduced in #324 only links top-level declarations. To make autolinking work with declarations deeper than top-level ones, we'd have to only autolink if it's on the same page (IMO).
The text was updated successfully, but these errors were encountered:
I’ve been documenting Siesta assuming that it might eventually work as follows:
A program element name must match a complete single-backticked block in order to autolink; you’ll never get links inside larger code blocks, or in plain text.
If an element contains a dot, it matches a chain of nested elements from the top level down: Class.method(_:foo:)
If an element does not contain a dot, then it either matches an element of the same parent, or a top-level element: Class, method(_:foo:).
If a parameter list is too annoyingly long to specify, or if you want to mention multiple methods with the same name, then method(...) matches the first method named “method” regardless of parameters.
All right, so I have a draft implementation for this. It can auto-link siblings, top-level elements, and dot-separated chains:
It allows a (...) for long parameter lists, and per the original implementation, does not link from an element to itself:
It only links single-backticked text — nothing inside code blocks, nothing inside plain text. Here, “Configuration” happens to be the name of a struct in this project, but is used here as a plain English word in a situation where linking to the struct would be downright misleading:
My implementation relies on code from #289 and #310, so I guess let’s work on getting those merged and then I’ll create a PR for this.
The autolinking introduced in #324 only links top-level declarations. To make autolinking work with declarations deeper than top-level ones, we'd have to only autolink if it's on the same page (IMO).
The text was updated successfully, but these errors were encountered: