sorted toml for better git merge
This commit is contained in:
		@@ -1,9 +1,11 @@
 | 
			
		||||
## dates and their corresponding seconds been here :)
 | 
			
		||||
[24-10-08]
 | 
			
		||||
u80864958_at_u80864958 = 425
 | 
			
		||||
[24-10-07]
 | 
			
		||||
u80864958_at_u80864958 = 432
 | 
			
		||||
[24-10-08]
 | 
			
		||||
u80864958_at_u80864958 = 425
 | 
			
		||||
[24-10-11]
 | 
			
		||||
u80864958_at_u80864958 = 6021
 | 
			
		||||
[24-10-15]
 | 
			
		||||
schreifuchs_at_archlinux = 128
 | 
			
		||||
[24-11-06]
 | 
			
		||||
schreifuchs_at_archibald = 301
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										11
									
								
								.timer.toml.b
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								.timer.toml.b
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
			
		||||
## dates and their corresponding seconds been here :)
 | 
			
		||||
[24-10-07]
 | 
			
		||||
u80864958_at_u80864958 = 432
 | 
			
		||||
[24-10-08]
 | 
			
		||||
u80864958_at_u80864958 = 425
 | 
			
		||||
[24-10-11]
 | 
			
		||||
u80864958_at_u80864958 = 6021
 | 
			
		||||
[24-10-15]
 | 
			
		||||
schreifuchs_at_archlinux = 128
 | 
			
		||||
[24-11-06]
 | 
			
		||||
schreifuchs_at_archibald = 18
 | 
			
		||||
							
								
								
									
										14
									
								
								lua/toml.lua
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								lua/toml.lua
									
									
									
									
									
								
							@@ -564,7 +564,17 @@ TOML.encode = function(tbl)
 | 
			
		||||
  local cache = {}
 | 
			
		||||
 | 
			
		||||
  local function parse(tbl)
 | 
			
		||||
    for k, v in pairs(tbl) do
 | 
			
		||||
    local tbl_keys = {}
 | 
			
		||||
    for k in pairs(tbl) do
 | 
			
		||||
      table.insert(tbl_keys, k)
 | 
			
		||||
    end
 | 
			
		||||
    table.sort(tbl_keys)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    for _, k in pairs(tbl_keys) do
 | 
			
		||||
      local v = tbl[k]
 | 
			
		||||
      print(k)
 | 
			
		||||
      print(v)
 | 
			
		||||
      if type(v) == "boolean" then
 | 
			
		||||
        toml = toml .. k .. " = " .. tostring(v) .. "\n"
 | 
			
		||||
      elseif type(v) == "number" then
 | 
			
		||||
@@ -572,7 +582,7 @@ TOML.encode = function(tbl)
 | 
			
		||||
      elseif type(v) == "string" then
 | 
			
		||||
        local quote = '"'
 | 
			
		||||
        v = v:gsub("\\", "\\\\")
 | 
			
		||||
 | 
			
		||||
        --
 | 
			
		||||
        -- if the string has any line breaks, make it multiline
 | 
			
		||||
        if v:match("^\n(.*)$") then
 | 
			
		||||
          quote = quote:rep(3)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user