Changes

Jump to navigation Jump to search
disable beta fields (beta no longer in progress)
Line 3: Line 3:     
-- whether to handle Stardew Valley beta fields (don't forget to comment or uncomment the beta fields in /doc)
 
-- whether to handle Stardew Valley beta fields (don't forget to comment or uncomment the beta fields in /doc)
local enableBeta = true
+
local enableBeta = false
    
--##########
 
--##########
Line 25: Line 25:  
--- Render the SMAPI compatibility table based on JSON input.
 
--- Render the SMAPI compatibility table based on JSON input.
 
-- @param frame The arguments passed to the script.
 
-- @param frame The arguments passed to the script.
-- @test mw.log(p.table({ args = { [1]='[  { "name":  "24h Clock", "author": "Lajna", "id":  "Lajna.24hClock", "nexus": 1695, "github": "LajnaLegenden/Stardew_Valley_Mods", "brokeIn": "SMAPI 3.0", "unofficial": [ "1.0.1-unofficial.1-pathoschild", "https://community.playstarbound.com/threads/updating-mods-for-stardew-valley-1-3.142524/page-76#post-3342641" ] } ]' }}))
+
-- @test mw.log(p.table({ args = { [1]='[  { "name":  "24h Clock", "author": "Lajna", // test\n"id":  "Lajna.24hClock", "nexus": 1695, "github": "LajnaLegenden/Stardew_Valley_Mods", "brokeIn": "SMAPI 3.0", "unofficial": [ "1.0.1-unofficial.1-pathoschild", "https://community.playstarbound.com/threads/updating-mods-for-stardew-valley-1-3.142524/page-76#post-3342641" ] } ]' }}))
 
function p.table(frame)
 
function p.table(frame)
 
   -- parse data
 
   -- parse data
   local data = mw.text.jsonDecode(frame.args[1])
+
  local json = string.gsub(frame.args[1], '%s*//[^"\n]+', '')
 +
   local data = mw.text.jsonDecode(json, mw.text.JSON_TRY_FIXING)
    
   -- start table
 
   -- start table
translators
8,404

edits

Navigation menu