# Encoding: UTF-8

{fileTypes: ["t2t"],
 keyEquivalent: "^~T",
 name: "Txt2tags",
 patterns: 
  [{begin: /^%%%\s*$/, end: "^%%%\\s*$\\n?", name: "comment.block.txt2tags"},
   {match: /^\s*[_=-]{20,}\s*$\n?/, name: "string.unquoted.txt2tags"},
   {match: /__(?<_1>[^\s](?<_2>|.*?[^\s])_*)__/,
    name: "markup.underline.txt2tags"},
   {match: /\*\*(?<_1>[^\s](?<_2>|.*?[^\s])\**)\*\*/,
    name: "markup.bold.txt2tags"},
   {match: /^\s*={1}[^=](?<_1>|.*[^=])={1}(?<_2>\[[\w-]*\])?\s*$\n?/,
    name: "markup.heading.1.txt2tags"},
   {match: /^\s*={2}[^=](?<_1>|.*[^=])={2}(?<_2>\[[\w-]*\])?\s*$\n?/,
    name: "markup.heading.2.txt2tags"},
   {match: /^\s*={3}[^=](?<_1>|.*[^=])={3}(?<_2>\[[\w-]*\])?\s*$\n?/,
    name: "markup.heading.3.txt2tags"},
   {match: /^\s*={4}[^=](?<_1>|.*[^=])={4}(?<_2>\[[\w-]*\])?\s*$\n?/,
    name: "markup.heading.4.txt2tags"},
   {match: /^\s*={5}[^=](?<_1>|.*[^=])={5}(?<_2>\[[\w-]*\])?\s*$\n?/,
    name: "markup.heading.5.txt2tags"},
   {match: /^\s*\+{1}[^+](?<_1>|.*[^+])\+{1}(?<_2>\[[\w-]*\])?\s*$\n?/,
    name: "markup.heading.1.txt2tags"},
   {match: /^\s*\+{2}[^+](?<_1>|.*[^+])\+{2}(?<_2>\[[\w-]*\])?\s*$\n?/,
    name: "markup.heading.2.txt2tags"},
   {match: /^\s*\+{3}[^+](?<_1>|.*[^+])\+{3}(?<_2>\[[\w-]*\])?\s*$\n?/,
    name: "markup.heading.3.txt2tags"},
   {match: /^\s*\+{4}[^+](?<_1>|.*[^+])\+{4}(?<_2>\[[\w-]*\])?\s*$\n?/,
    name: "markup.heading.4.txt2tags"},
   {match: /^\s*\+{5}[^+](?<_1>|.*[^+])\+{5}(?<_2>\[[\w-]*\])?\s*$\n?/,
    name: "markup.heading.5.txt2tags"},
   {match: /\/\/(?<_1>[^\s](?<_2>|.*?[^\s])\/*)\/\//,
    name: "markup.italic.txt2tags"},
   {match: /--(?<_1>[^\s](?<_2>|.*?[^\s])-*)--/,
    name: "invalid.deprecated.strike.txt2tags"},
   {match: /""(?<_1>[^\s](?<_2>|.*?[^\s])"*)""/,
    name: "string.quoted.other.raw.inline.txt2tags"},
   {match: /^""" (?=.).*$\n?/, name: "string.quoted.other.raw.line.txt2tags"},
   {begin: /^"""\s*$/,
    end: "^\"\"\"\\s*$\\n?",
    name: "string.quoted.other.raw.block.txt2tags"},
   {match: /^ *\+ (?=[^ ])/, name: "markup.list.numbered.txt2tags"},
   {match: /^ *- (?=[^ ])/, name: "markup.list.unnumbered.txt2tags"},
   {match: /^ *: (?=.)/, name: "markup.list.unnumbered.txt2tags"},
   {match: /^(?<_1> *)(?<_2>[-+:])\s*$/, name: "markup.list.txt2tags"},
   {begin: /^```\s*$/,
    end: "^```\\s*$\\n?",
    name: "markup.raw.verb.block.txt2tags"},
   {match: /^``` (?=.).*$\n?/, name: "markup.raw.verb.line.txt2tags"},
   {match: /``(?<_1>[^\s](?<_2>|.*?[^\s])`*)``/,
    name: "markup.raw.verb.inline.txt2tags"},
   {match: /\s+$/, name: "invalid.deprecated.trailing-whitespace.txt2tags"},
   {match: /(?i)%%(?<_1>date|mtime|infile|outfile)(?<_2>\(.*?\))?|%%toc/,
    name: "string.interpolated.txt2tags"},
   {match: 
     /(?i)^%!\s*(?<_1>target|encoding|style|options|include|includeconf|preproc|postproc|guicolors)\s*(?<_2>\(\w*\))?\s*:.*/,
    name: "constant.character.txt2tags"},
   {match: /\[[\w_,.+%$\#@!?+~\/-]+\.(?<_1>png|jpe?g|gif|eps|bmp)\]/,
    name: "meta.tag.image.txt2tags"},
   {match: 
     /(?i)\b[A-Za-z0-9_.-]+@(?<_1>[A-Za-z0-9_-]+\.)+[A-Za-z]{2,4}\b(?<_2>\?[A-Za-z0-9\/%&=+;.,$@*_-]+)?/,
    name: "meta.tag.email.txt2tags"},
   {match: 
     /(?i)\b(?<_1>(?<_2>https?|ftp|news|telnet|gopher|wais):\/\/(?<_3>[A-Za-z0-9_.-]+(?<_4>:[^ @]*)?@)?|(?<_5>www[23]?|ftp)\.)[A-Za-z0-9%._\/~:,=$@&+-]+\b\/*(?<_6>\?[A-Za-z0-9\/%&=+;.,$@*_-]+)?(?<_7>#[A-Za-z0-9%._-]*)?/,
    name: "meta.tag.url.txt2tags"},
   {match: 
     /(?i)\[(?<_1>\[[\w_,.+%$\#@!?+~\/-]+\.(?<_2>png|jpe?g|gif|eps|bmp)\]|[^\]]+) (?<_3>(?<_4>(?<_5>https?|ftp|news|telnet|gopher|wais):\/\/(?<_6>[A-Za-z0-9_.-]+(?<_7>:[^ @]*)?@)?|(?<_8>www[23]?|ftp)\.)[A-Za-z0-9%._\/~:,=$@&+-]+\b\/*(?<_9>\?[A-Za-z0-9\/%&=+;.,$@*_-]+)?(?<_10>#[A-Za-z0-9%._-]*)?|[A-Za-z0-9_.-]+@(?<_11>[A-Za-z0-9_-]+\.)+[A-Za-z]{2,4}\b(?<_12>\?[A-Za-z0-9\/%&=+;.,$@*_-]+)?|[A-Za-z0-9%._\/~:,=$@&+-]+|[A-Za-z0-9%._\/~:,=$@&+-]*(?<_13>#[A-Za-z0-9%._-]*))\]/,
    name: "meta.tag.link.txt2tags"},
   {match: /^\t.*$\n?/, name: "markup.quote.txt2tags"},
   {match: /^%.*$\n?/, name: "comment.line.txt2tags"}],
 scopeName: "text.txt2tags",
 uuid: "B5A751C0-2CE4-41A5-99FB-7B673943DE60"}
