Skip to content

wiki: toggle line numbers on code blocks

Summary

The Moin wiki supports Syntax Highlighting which allows code block line numbers to be toggled on/off.

A quick search only shows it used on the Lua Examples and Dissectors.

Short term solution would be to remove the line numbers from the affected code blocks.
This makes copy/paste easier to kick the tires on the examples.
Long term, look at adding this function back to the Wiki if/when it is migrated off Gitlab.

Affected website

https://gitlab.com/wireshark/wireshark/-/wikis/Lua/Examples
https://gitlab.com/wireshark/wireshark/-/wikis/Lua/Dissectors

What is the exact issue

Source as brought into gitlab wiki:

## Using Lua to register protocols to more ports

<div class="highlight lua">

<div class="codearea" dir="ltr" lang="en">

``` 
   1 -- register http to handle ports 4888-4891
   2 do
   3         local tcp_port_table = DissectorTable.get("tcp.port")
   4         local http_dissector = tcp_port_table:get_dissector(80)
   5         for i,port in ipairs{4888,4889,4890,4891} do
   6                 tcp_port_table:add(port,http_dissector)
   7         end
   8 end
```

</div>

</div>

Relevant logs and/or screenshots

210329_toggle_line_numbers_anno

Additional information

(Further information which may help to solve this issue)

web sites

Edited by Chuck Craft
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information