Module:ResolveEntityId/doc: Difference between revisions

Content deleted Content added
document redirect-following behavior
Line 53:
|<syntaxhighlight lang="lua">local resolveEntityId = require( "Module:ResolveEntityId" )._id
id = resolveEntityId('WP:R')</syntaxhighlight>
|style="vertical-align: mid;"|<code>id</code> = <code>{{#invoke:ResolveEntityId|entityid|WP:RDouglas adams|'''nil'''}}</code>
| "WP:RDouglas adams" is not a valid Wikidata ID, and while [[WP:RDouglas adams]] (with a lower-case "a") exists, it is a redirect andto does[[Douglas notAdams]]. haveTherefore athe Wikidata ID, sofor the latter <code>'''nil'''</code>page is returned
|-
|<syntaxhighlight lang="lua">local resolveEntityId = require( "Module:ResolveEntityId" )._id
id = resolveEntityId('Wikipedia:Village pump (technical)/Archive 1')</syntaxhighlight>
|style="vertical-align: mid;"|<code>id</code> = <code>{{#invoke:ResolveEntityId|entityid|Wikipedia:Village pump (technical)/Archive 1|'''nil'''}}</code>
| "Wikipedia:Village pump (technical)/Archive 1" is not a valid Wikidata ID, and while [[Wikipedia:Village pump (technical)/Archive 1]] exists, it does not have a Wikidata ID, so <code>'''nil'''</code> is returned
|}