Module talk:Chart: Difference between revisions

Content deleted Content added
Line 461:
::::''Todah'', {{u|קיפודנחש}}. Looks like it'll be a fairly thin wrapper, but... I'm [[Module:Graph table|stuck]] at [[User:Guarapiranga/sandbox/5|{{red|'''Lua error in Module:Graph_table at line 15: attempt to call field 'pieChart' (a nil value).'''}}]]. What am I doing wrong? [[User:Guarapiranga|— 𝐆𝐮𝐚𝐫𝐚𝐩𝐢𝐫𝐚𝐧𝐠𝐚]] ([[User talk:Guarapiranga|talk]]) 06:13, 25 May 2021 (UTC)
:::::I fixed [[Module:Graph table]] but now [[User:Guarapiranga/sandbox/5]] has another error. Regardless of this module, I have not seen any support either here or where it was raised at [[WP:VPT]] for the idea of having a module parse the wikitext of a page to extract data from a wikitable. I wouldn't put much effort into that approach. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 07:34, 25 May 2021 (UTC)
::::::Thanks, {{u|Johnuniq}}. I fixed the regex, as you recommended, and it's pulling the data, but it seems this module needs each data point on a different line(?):{{pre|addSlice( i, mw.ustring.match( slice, '^%(%s*(.-)%s*%)$' ) )}} But what's the deal with ^ and $, if [[mw:Extension:Scribunto/Lua reference manual#string.gmatch|Scribunto manual]] says that {{tq|a '^' at the start of a pattern is not magic, as this would prevent the iteration}}, and that {{tq|it is treated as a literal character}}? Is that why it uses mw.ustring instead? The [[mw:Extension:Scribunto/Lua reference manual#Ustring patterns|ustring patterns section]] doesn't say anything about mw.ustring extending the controls to ^ and $. [[User:Guarapiranga|— 𝐆𝐮𝐚𝐫𝐚𝐩𝐢𝐫𝐚𝐧𝐠𝐚]] ([[User talk:Guarapiranga|talk]]) 16:16, 25 May 2021 (UTC)