Skip to content

Commit c71ca8c

Browse files
authored
Update ldoc.ltp
Lua 5.5 treats for loop variables as const, which means it is no longer permitted to reassign them in the loop. Easy fix is to create a new local variable and use it instead. I've done that for this and with that, ldoc now runs in the Penlight root without errors.
1 parent e7f62e3 commit c71ca8c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ldoc.ltp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,11 +293,11 @@
293293

294294
# for kind, mods in ldoc.kinds() do
295295
<h2>$(kind)</h2>
296-
# kind = kind:lower()
296+
# local lowerkind = kind:lower()
297297
<table class="module_list">
298298
# for m in mods() do
299299
<tr>
300-
<td class="name" $(nowrap)><a href="$(no_spaces(kind))/$(m.name).html">$(m.name)</a></td>
300+
<td class="name" $(nowrap)><a href="$(no_spaces(lowerkind))/$(m.name).html">$(m.name)</a></td>
301301
<td class="summary">$(M(ldoc.strip_header(m.summary),m))</td>
302302
</tr>
303303
# end -- for modules

0 commit comments

Comments
 (0)