Misplaced Pages

Module:Params/doc/link to the code/doc: Difference between revisions

Article snapshot taken from[REDACTED] with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
< Module:Params | doc | link to the code Browse history interactively← Previous editNext edit →Content deleted Content addedVisualWikitext
Revision as of 01:19, 8 July 2024 editGrufo (talk | contribs)Extended confirmed users4,609 edits Update the docTag: Manual revert← Previous edit Revision as of 00:18, 21 September 2024 edit undoGrufo (talk | contribs)Extended confirmed users4,609 editsmNo edit summaryNext edit →
Line 53: Line 53:
After each update in the code of ] the list of line numbers stored in this template needs to be updated. If you use ] or other ] operating systems you can do that automatically by launching: After each update in the code of ] the list of line numbers stored in this template needs to be updated. If you use ] or other ] operating systems you can do that automatically by launching:


<syntaxhighlight lang="sh">grep -n '^library.\|^static_iface.' params.lua | sed 's/\(library\|static_iface\)\(\.\|\\|\s*=\s*function(\+)//g;s/^\(\+\):\(.\+\)$/ | \2 = L-\1/g'</syntaxhighlight> <syntaxhighlight lang="sh">grep -n '^library.\|^static_iface.' params.lua | sed 's/\(library\|static_iface\)\(\.\|\\|\s*=\s*function\s*(\+)//g;s/^\(\+\):\(.\+\)$/ | \2 = L-\1/g'</syntaxhighlight>


<includeonly>{{Sandbox other|| <includeonly>{{Sandbox other||

Revision as of 00:18, 21 September 2024

This is a helper template for the documentation of Module:Params that creates a link to the line in the Lua code where a function or a modifier is declared.

Usage

  • {{module:params/doc/link to the code|squeezing}}squeezing
  • {{module:params/doc/link to the code|cutting|Lorem ipsum}}Lorem ipsum

Complete list of the links generated

Updating the list

After each update in the code of Module:Params the list of line numbers stored in this template needs to be updated. If you use GNU or other Unix-like operating systems you can do that automatically by launching:

grep -n '^library.\|^static_iface.' params.lua | sed 's/\(library\|static_iface\)\(\.\|\\|\s*=\s*function\s*(\+)//g;s/^\(\+\):\(.\+\)$/		| \2 = L-\1/g'


Module:Params/doc/link to the code/doc: Difference between revisions Add topic