local p =
local function prepareText(inputString) local retVal = inputString local cleanupPatterns = -- Note, these are invoked in order, which may be important! cleanupPatterns[1] = '=+[^=]+=+[]-\n' -- no headers cleanupPatterns[2] = '[^[]%^[]+[]%a%d' -- no external link URLs cleanupPatterns[3] = '