Template:Encodefirst/doc

Revision as of 12:11, 4 April 2023 by imported>DB1729 (Reverted 1 edit by 104.5.223.19 (talk): Unexplained removal)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Lua error: Internal error: The interpreter exited with status 1.

This template replaces the first character of the argument with its HTML entity if it is one of four wiki markup characters : ; * #. This can sometimes fix the issue at Help:Template#Problems and workarounds where a character may be processed as though it were at the beginning of a line.

Usage

{{Encodefirst|<string>}}

Examples

The output looks like the input whether a character is replaced or not.

{{Encodefirst|*Lisp}} produces: Lua error: Internal error: The interpreter exited with status 1.

But the output will behave differently from the input in some situations where it is processed. For example, {{la}} fails as of August 2017 if its argument starts with *.

{{la|*Lisp}} causes the asterisk to be processed as list markup and produces broken display.

{{la|{{Encodefirst|*Lisp}}}} works correctly:

[[:Lua error: Internal error: The interpreter exited with status 1.]] ([{{fullurl:Lua error: Internal error: The interpreter exited with status 1.|action=edit}} edit] | [[Talk:Lua error: Internal error: The interpreter exited with status 1.|talk]] | [{{fullurl:Lua error: Internal error: The interpreter exited with status 1.|action=history}} history] | [{{fullurl:Lua error: Internal error: The interpreter exited with status 1.|action=protect}} protect] | [{{fullurl:Lua error: Internal error: The interpreter exited with status 1.|action=delete}} delete] | [{{fullurl:Special:Whatlinkshere/Lua error: Internal error: The interpreter exited with status 1.|limit=999}} links] | [{{fullurl:Lua error: Internal error: The interpreter exited with status 1.|action=watch}} watch] | logs | views)