Module:Grammar: Difference between revisions

Jump to navigation Jump to search
133 bytes added ,  01:31, 7 August 2019
another bug with 're
(fixed bug with verbs not after pronoun)
(another bug with 're)
Line 18: Line 18:


parsedtext = string.gsub(frame.args[1], "=([^=]+)=", function(f)
parsedtext = string.gsub(frame.args[1], "=([^=]+)=", function(f)
  for a, b, c in string.gmatch(f, "(%w*)[:%.](%w*)(:?%w*)") do
  for a, b, c in string.gmatch(f, "(%w*)[:%.](['%w]*)(:?%w*)") do
   local capitalized = ((b:gsub("^%l", string.upper)) == string.gsub(b,"(^%w)","%1"))
   local capitalized = ((b:gsub("^%l", string.upper)) == string.gsub(b,"(^%w)","%1"))
   returnstring = ""
   returnstring = ""
Line 44: Line 44:
         elseif (b == "have") then
         elseif (b == "have") then
             returnstring= "has"
             returnstring= "has"
        elseif (b == "'re") then
            returnstring= "'s"
         else
         else
             returnstring= b .. "s"
             returnstring= b .. "s"
Line 56: Line 58:
         elseif (b == "have") then
         elseif (b == "have") then
             returnstring= "has"
             returnstring= "has"
        elseif (b == "'re") then
            returnstring= "'s"
         else
         else
             returnstring= b .. "s"
             returnstring= b .. "s"

Navigation menu