**Steps to replicate the issue** (include links if applicable):
* Create a page with content `-{[[man|gggg]]}-` or other piped links surrounded by `-{ }-` (a language variant block)
Find an example page at [[ https://zh.wiktionary.org/wiki/User:Hzy980512/sandbox/1 | my sandbox ]] on Chinese Wiktionary.
**What happens?**:
REST API `api/rest_v1/page/html/` returns faulty rendering of the link:
```
<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"gggg]]"}}' id="mwBQ"></span>
```
**What should have happened instead?**:
It should render the link correctly and put it into attribute `data-mw-variant`. For example, for wikitext `-{[[man]]}-`, it works well, where it returns
```
<span typeof="mw:LanguageVariant" data-mw-variant='{"disabled":{"t":"<a rel=\"mw:WikiLink\" href=\"./man\" title=\"man\" data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"./man\"},\"sa\":{\"href\":\"man\"},\"dsr\":[25,32,2,2]}'>man</a>"}}' id="mwBA"></span>
```
**Software version** (on `Special:Version` page; skip for WMF-hosted wikis like Wikipedia):
1.44.0-wmf.25 (964d7fd) on [[ https://zh.wiktionary.org/ | Chinese Wiktionary ]].
**Other information** (browser name/version, screenshots, etc.):
It seems to only affect the first link, if the variant block contains more piped links, the links other than the first one works well.