Skip to content

Commit

Permalink
parser.js indentation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nfrasser committed Jan 5, 2017
1 parent 6b490c7 commit 0f31157
Showing 1 changed file with 34 additions and 34 deletions.
68 changes: 34 additions & 34 deletions src/linkify/core/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,40 +60,40 @@ let S_START = makeState();

// Intermediate states for URLs. Note that domains that begin with a protocol
// are treated slighly differently from those that don't.
let S_PROTOCOL = makeState(); // e.g., 'http:'
let S_MAILTO = makeState(); // 'mailto:'
let S_PROTOCOL_SLASH = makeState(); // e.g., '/', 'http:/''
let S_PROTOCOL_SLASH_SLASH = makeState(); // e.g., '//', 'http://'
let S_DOMAIN = makeState(); // parsed string ends with a potential domain name (A)
let S_DOMAIN_DOT = makeState(); // (A) domain followed by DOT
let S_TLD = makeState(URL); // (A) Simplest possible URL with no query string
let S_TLD_COLON = makeState(); // (A) URL followed by colon (potential port number here)
let S_TLD_PORT = makeState(URL); // TLD followed by a port number
let S_URL = makeState(URL); // Long URL with optional port and maybe query string
let S_URL_NON_ACCEPTING = makeState(); // URL followed by some symbols (will not be part of the final URL)
let S_URL_OPENBRACE = makeState(); // URL followed by {
let S_URL_OPENBRACKET = makeState(); // URL followed by [
let S_URL_OPENANGLEBRACKET = makeState(); // URL followed by <
let S_URL_OPENPAREN = makeState(); // URL followed by (
let S_URL_OPENBRACE_Q = makeState(URL); // URL followed by { and some symbols that the URL can end it
let S_URL_OPENBRACKET_Q = makeState(URL); // URL followed by [ and some symbols that the URL can end it
let S_URL_OPENANGLEBRACKET_Q = makeState(URL); // URL followed by < and some symbols that the URL can end it
let S_URL_OPENPAREN_Q = makeState(URL); // URL followed by ( and some symbols that the URL can end it
let S_URL_OPENBRACE_SYMS = makeState(); // S_URL_OPENBRACE_Q followed by some symbols it cannot end it
let S_URL_OPENBRACKET_SYMS = makeState(); // S_URL_OPENBRACKET_Q followed by some symbols it cannot end it
let S_URL_OPENANGLEBRACKET_SYMS = makeState(); // S_URL_OPENANGLEBRACKET_Q followed by some symbols it cannot end it
let S_URL_OPENPAREN_SYMS = makeState(); // S_URL_OPENPAREN_Q followed by some symbols it cannot end it
let S_EMAIL_DOMAIN = makeState(); // parsed string starts with local email info + @ with a potential domain name (C)
let S_EMAIL_DOMAIN_DOT = makeState(); // (C) domain followed by DOT
let S_EMAIL = makeState(EMAIL); // (C) Possible email address (could have more tlds)
let S_EMAIL_COLON = makeState(); // (C) URL followed by colon (potential port number here)
let S_EMAIL_PORT = makeState(EMAIL); // (C) Email address with a port
let S_MAILTO_EMAIL = makeState(MAILTOEMAIL); // Email that begins with the mailto prefix (D)
let S_MAILTO_EMAIL_NON_ACCEPTING = makeState(); // (D) Followed by some non-query string chars
let S_LOCALPART = makeState(); // Local part of the email address
let S_LOCALPART_AT = makeState(); // Local part of the email address plus @
let S_LOCALPART_DOT = makeState(); // Local part of the email address plus '.' (localpart cannot end in .)
let S_NL = makeState(MNL); // single new line
let S_PROTOCOL = makeState(); // e.g., 'http:'
let S_MAILTO = makeState(); // 'mailto:'
let S_PROTOCOL_SLASH = makeState(); // e.g., '/', 'http:/''
let S_PROTOCOL_SLASH_SLASH = makeState(); // e.g., '//', 'http://'
let S_DOMAIN = makeState(); // parsed string ends with a potential domain name (A)
let S_DOMAIN_DOT = makeState(); // (A) domain followed by DOT
let S_TLD = makeState(URL); // (A) Simplest possible URL with no query string
let S_TLD_COLON = makeState(); // (A) URL followed by colon (potential port number here)
let S_TLD_PORT = makeState(URL); // TLD followed by a port number
let S_URL = makeState(URL); // Long URL with optional port and maybe query string
let S_URL_NON_ACCEPTING = makeState(); // URL followed by some symbols (will not be part of the final URL)
let S_URL_OPENBRACE = makeState(); // URL followed by {
let S_URL_OPENBRACKET = makeState(); // URL followed by [
let S_URL_OPENANGLEBRACKET = makeState(); // URL followed by <
let S_URL_OPENPAREN = makeState(); // URL followed by (
let S_URL_OPENBRACE_Q = makeState(URL); // URL followed by { and some symbols that the URL can end it
let S_URL_OPENBRACKET_Q = makeState(URL); // URL followed by [ and some symbols that the URL can end it
let S_URL_OPENANGLEBRACKET_Q = makeState(URL); // URL followed by < and some symbols that the URL can end it
let S_URL_OPENPAREN_Q = makeState(URL); // URL followed by ( and some symbols that the URL can end it
let S_URL_OPENBRACE_SYMS = makeState(); // S_URL_OPENBRACE_Q followed by some symbols it cannot end it
let S_URL_OPENBRACKET_SYMS = makeState(); // S_URL_OPENBRACKET_Q followed by some symbols it cannot end it
let S_URL_OPENANGLEBRACKET_SYMS = makeState(); // S_URL_OPENANGLEBRACKET_Q followed by some symbols it cannot end it
let S_URL_OPENPAREN_SYMS = makeState(); // S_URL_OPENPAREN_Q followed by some symbols it cannot end it
let S_EMAIL_DOMAIN = makeState(); // parsed string starts with local email info + @ with a potential domain name (C)
let S_EMAIL_DOMAIN_DOT = makeState(); // (C) domain followed by DOT
let S_EMAIL = makeState(EMAIL); // (C) Possible email address (could have more tlds)
let S_EMAIL_COLON = makeState(); // (C) URL followed by colon (potential port number here)
let S_EMAIL_PORT = makeState(EMAIL); // (C) Email address with a port
let S_MAILTO_EMAIL = makeState(MAILTOEMAIL); // Email that begins with the mailto prefix (D)
let S_MAILTO_EMAIL_NON_ACCEPTING = makeState(); // (D) Followed by some non-query string chars
let S_LOCALPART = makeState(); // Local part of the email address
let S_LOCALPART_AT = makeState(); // Local part of the email address plus @
let S_LOCALPART_DOT = makeState(); // Local part of the email address plus '.' (localpart cannot end in .)
let S_NL = makeState(MNL); // single new line

// Make path from start to protocol (with '//')
S_START
Expand Down

0 comments on commit 0f31157

Please sign in to comment.