Jump to content

Module:Params/doc/link to the code/doc

From Wikipedia, the free encyclopedia

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[edit]

  • {{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[edit]

Updating the list[edit]

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:

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