name: Textile fileTypes:

firstLineMatch: textile scopeName: text.html.textile repository:

inline: 
  patterns: 
  - name: text.html.textile
    match: "&(?![A-Za-z0-9]+;)"
    comment: "& is handled automagically by textile, so we match it to avoid text.html.basic from flagging it"
  - name: markup.list.unnumbered.textile
    captures: 
      "1": 
        name: entity.name.type.textile
    match: ^\*+(\([^)]*\)|{[^}]*})*(\s+|$)
  - name: markup.list.numbered.textile
    captures: 
      "1": 
        name: entity.name.type.textile
    match: ^#+(\([^)]*\)|{[^}]*})*\s+
  - name: meta.link.reference.textile
    captures: 
      "1": 
        name: string.other.link.title.textile
      "2": 
        name: string.other.link.description.title.textile
      "3": 
        name: constant.other.reference.link.textile
    match: "(?x)\n\
      \t\t\t\t\t\t\t\t\"\t\t\t\t\t\t\t\t# Start name, etc\n\
      \t\t\t\t\t\t\t\t\t(?:\t\t\t\t\t\t\t# Attributes\n\
      \t\t\t\t\t\t\t\t\t\t# I swear, this is how the language is defined,\n\
      \t\t\t\t\t\t\t\t\t\t# couldnt make it up if I tried.\n\
      \t\t\t\t\t\t\t\t\t\t(?:\\([^)]+\\))?(?:\\{[^}]+\\})?(?:\\[[^\\]]+\\])?\n\
      \t\t\t\t\t\t\t\t\t\t\t# Class, Style, Lang\n\
      \t\t\t\t\t\t\t\t\t  | (?:\\{[^}]+\\})?(?:\\[[^\\]]+\\])?(?:\\([^)]+\\))?\n\
      \t\t\t\t\t\t\t\t\t\t\t# Style, Lang, Class\n\
      \t\t\t\t\t\t\t\t\t  | (?:\\[[^\\]]+\\])?(?:\\{[^}]+\\})?(?:\\([^)]+\\))?\n\
      \t\t\t\t\t\t\t\t\t\t\t# Lang, Style, Class\n\
      \t\t\t\t\t\t\t\t\t)?\n\
      \t\t\t\t\t\t\t\t\t([^\"]+?)\t\t\t\t\t# Link name\n\
      \t\t\t\t\t\t\t\t\t\\s?\t\t\t\t\t\t\t# Optional whitespace\n\
      \t\t\t\t\t\t\t\t\t(?:\\(([^)]+?)\\))?\n\
      \t\t\t\t\t\t\t\t\":\t\t\t\t\t\t\t\t# End name\n\
      \t\t\t\t\t\t\t\t(\\w[-\\w_]*)\t\t\t\t\t\t# Linkref\n\
      \t\t\t\t\t\t\t\t(?=[^\\w\\/;]*?(<|\\s|$))\t\t\t# Catch closing punctuation\n\
      \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t#  and end of meta.link\n\
      \t\t\t\t\t"
  - name: meta.link.inline.textile
    captures: 
      "1": 
        name: string.other.link.title.textile
      "2": 
        name: string.other.link.description.title.textile
      "3": 
        name: markup.underline.link.textile
    match: "(?x)\n\
      \t\t\t\t\t\t\t\t\"\t\t\t\t\t\t\t\t# Start name, etc\n\
      \t\t\t\t\t\t\t\t\t(?:\t\t\t\t\t\t\t# Attributes\n\
      \t\t\t\t\t\t\t\t\t\t# I swear, this is how the language is defined,\n\
      \t\t\t\t\t\t\t\t\t\t# couldnt make it up if I tried.\n\
      \t\t\t\t\t\t\t\t\t\t(?:\\([^)]+\\))?(?:\\{[^}]+\\})?(?:\\[[^\\]]+\\])?\n\
      \t\t\t\t\t\t\t\t\t\t\t# Class, Style, Lang\n\
      \t\t\t\t\t\t\t\t\t  | (?:\\{[^}]+\\})?(?:\\[[^\\]]+\\])?(?:\\([^)]+\\))?\n\
      \t\t\t\t\t\t\t\t\t\t\t# Style, Lang, Class\n\
      \t\t\t\t\t\t\t\t\t  | (?:\\[[^\\]]+\\])?(?:\\{[^}]+\\})?(?:\\([^)]+\\))?\n\
      \t\t\t\t\t\t\t\t\t\t\t# Lang, Style, Class\n\
      \t\t\t\t\t\t\t\t\t)?\n\
      \t\t\t\t\t\t\t\t\t([^\"]+?)\t\t\t\t\t# Link name\n\
      \t\t\t\t\t\t\t\t\t\\s?\t\t\t\t\t\t\t# Optional whitespace\n\
      \t\t\t\t\t\t\t\t\t(?:\\(([^)]+?)\\))?\n\
      \t\t\t\t\t\t\t\t\":\t\t\t\t\t\t\t\t# End Name\n\
      \t\t\t\t\t\t\t\t(\\S*?(?:\\w|\\/|;))\t\t\t\t# URL\n\
      \t\t\t\t\t\t\t\t(?=[^\\w\\/;]*?(<|\\s|$))\t\t\t# Catch closing punctuation\n\
      \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t#  and end of meta.link\n\
      \t\t\t\t\t"
  - name: meta.image.inline.textile
    captures: 
      "2": 
        name: markup.underline.link.image.textile
      "3": 
        name: string.other.link.description.textile
      "4": 
        name: markup.underline.link.textile
    match: "(?x)\n\
      \t\t\t\t\t\t\t\t\\!\t\t\t\t\t\t\t\t\t\t# Open image\n\
      \t\t\t\t\t\t\t\t(\\<|\\=|\\>)?\t\t\t\t\t\t\t\t# Optional alignment\n\
      \t\t\t\t\t\t\t\t(?:\t\t\t\t\t\t\t\t\t\t# Attributes\n\
      \t\t\t\t\t\t\t\t\t# I swear, this is how the language is defined,\n\
      \t\t\t\t\t\t\t\t\t# couldnt make it up if I tried.\n\
      \t\t\t\t\t\t\t\t\t(?:\\([^)]+\\))?(?:\\{[^}]+\\})?(?:\\[[^\\]]+\\])?\n\
      \t\t\t\t\t\t\t\t\t\t# Class, Style, Lang\n\
      \t\t\t\t\t\t\t\t  | (?:\\{[^}]+\\})?(?:\\[[^\\]]+\\])?(?:\\([^)]+\\))?\n\
      \t\t\t\t\t\t\t\t\t\t# Style, Lang, Class\n\
      \t\t\t\t\t\t\t\t  | (?:\\[[^\\]]+\\])?(?:\\{[^}]+\\})?(?:\\([^)]+\\))?\n\
      \t\t\t\t\t\t\t\t\t\t# Lang, Style, Class\n\
      \t\t\t\t\t\t\t\t)?\n\
      \t\t\t\t\t\t\t\t(?:\\.[ ])?            \t\t\t\t\t# Optional\n\
      \t\t\t\t\t\t\t\t([^\\s(!]+?)         \t\t\t\t\t# Image URL\n\
      \t\t\t\t\t\t\t\t\\s?                \t\t\t\t\t\t# Optional space\n\
      \t\t\t\t\t\t\t\t(?:\\(((?:[^\\(\\)]|\\([^\\)]+\\))+?)\\))?   \t# Optional title\n\
      \t\t\t\t\t\t\t\t\\!\t\t\t\t\t\t\t\t\t\t# Close image\n\
      \t\t\t\t\t\t\t\t(?:\n\
      \t\t\t\t\t\t\t\t\t:\n\
      \t\t\t\t\t\t\t\t\t(\\S*?(?:\\w|\\/|;))\t\t\t\t\t# URL\n\
      \t\t\t\t\t\t\t\t\t(?=[^\\w\\/;]*?(<|\\s|$))\t\t\t\t# Catch closing punctuation\n\
      \t\t\t\t\t\t\t\t)?\n\
      \t\t\t\t\t"
  - name: markup.other.table.cell.textile
    captures: 
      "1": 
        name: entity.name.type.textile
    match: \|(\([^)]*\)|{[^}]*})*(\\\||.)+\|
  - name: markup.bold.textile
    captures: 
      "3": 
        name: entity.name.type.textile
    match: \B(\*\*?)((\([^)]*\)|{[^}]*}|\[[^]]+\]){0,3})(\S.*?\S|\S)\1\B
  - name: markup.deleted.textile
    captures: 
      "2": 
        name: entity.name.type.textile
    match: \B-((\([^)]*\)|{[^}]*}|\[[^]]+\]){0,3})(\S.*?\S|\S)-\B
  - name: markup.inserted.textile
    captures: 
      "2": 
        name: entity.name.type.textile
    match: \B\+((\([^)]*\)|{[^}]*}|\[[^]]+\]){0,3})(\S.*?\S|\S)\+\B
  - name: markup.italic.textile
    captures: 
      "2": 
        name: entity.name.type.textile
    match: (?:\b|\s)_((\([^)]*\)|{[^}]*}|\[[^]]+\]){0,3})(\S.*?\S|\S)_(?:\b|\s)
  - name: markup.italic.phrasemodifiers.textile
    captures: 
      "3": 
        name: entity.name.type.textile
    match: \B([@\^~%]|\?\?)((\([^)]*\)|{[^}]*}|\[[^]]+\]){0,3})(\S.*?\S|\S)\1
  - name: entity.name.tag.textile
    match: (?<!w)\[[0-9+]\]
    comment: Footnotes

uuid: 68F0B1A5-3274-4E85-8B3A-A481C5F5B194 patterns:

  • include: text.html.basic comment: Since html is valid in Textile include the html patterns

  • keyEquivalent: ^~T