User:Anne drew/FormatSeeAlso
From Wikipedia, the free encyclopedia
FormatSeeAlso automatically formats "See also" sections according to MOS:ALSO. It converts wikilinks to {{anl}} templates (adding short descriptions), formats section links with {{slink}}, and optionally sorts links alphabetically. The script preserves existing formatting like italics, quotes, and manual descriptions.
(3 months ago)
| Description | Formats "See also" sections per MOS:ALSO – annotates links, alphabetizes, and makes other improvements. |
|---|---|
| Author | Anne drew |
| Updated | December 13, 2025 (3 months ago) |
| Source | User:Anne drew/FormatSeeAlso.js |
| Repository | codeberg.org |
Credit to Guywan for the sorting logic from User:Guywan/Scripts/BulletSort.
| You take full responsibility for any actions taken using FormatSeeAlso. You must read and abide by all relevant Wikipedia policies when using this tool; failure to do so may result in being blocked from editing. |
Installation
- Go to your common JavaScript and paste:
{{subst:iusc|User:Anne drew/FormatSeeAlso.js}} - Save the page.
Usage

Edit any article with a "See also" section and click the purple "FSA" button. The script guides you through three steps:
- Review missing descriptions – Identify articles needing
{{Short description}}templates - Select redirects to annotate – Choose which redirects should use their target's description
- Sort lines – Optionally alphabetize per MOS:ALSO
Review your changes and save.
Example
| Before | After |
|---|---|
* [[Page with no description]]* [[Number]]* [[Computer science#Algorithms]]* ''[[Animal Farm]]'' |
* {{anl|Animal Farm|''Animal Farm''}}* {{slink|Computer science#Algorithms}}* {{anl|Number}}* [[Page with no description]] |
Workflow details
Step 1: Missing descriptions
Shows a dialog listing links missing descriptions so you can add them before formatting. The dialog groups items by type:
- Articles – Direct links without short descriptions
- Redirects to sections – Redirects pointing to sections that lack their own description
- Redirects to articles – Redirects where both redirect and target lack descriptions
The dialog excludes red links, non-mainspace pages, disambiguation pages, links with manual descriptions, and articles with {{Short description|none}}.
Step 2: Redirect selection
For redirects where the target page has a description, you choose whether to apply that description. The script handles some cases automatically:
- Auto-accepted: Redirects with their own description; trivial redirects (capitalization/punctuation differences only)
- Auto-skipped: Section redirects without their own description (to avoid misleading descriptions)
Step 3: Sorting
Optional alphabetical sorting with: natural number ordering (2, 10, 100), case-insensitive comparison, quote/formatting normalization, and nested list preservation.
Link transformations
| Input | Output |
|---|---|
[[Article#Section]] | {{slink|Article|Section}} |
''[[Animal Farm]]'' | {{anl|Animal Farm|''Animal Farm''}} |
"[[Article]]" | {{anl|Article|quote=yes}} |
[[United Nations|U.N.]] | {{anl|United Nations|U.N.}} |
[[United States]] (US) | {{anl|United States|abbr=US}} |
[[Allied Commission]]s | {{anl|Allied Commission|Allied Commissions}} |
[[Article]], description | [[Article]] – Description |
What the script skips
- Disambiguation pages
- Non-mainspace links (e.g.,
[[Wikipedia:MOS]]) - Colon-prefixed links (e.g.,
[[:Category:Science]]) - Links with trailing context (e.g.,
[[Link]] (more information...)) - Existing templates, red links, and articles without descriptions