diff --git a/md/learn/index.md b/md/learn/index.md index a22181e..e9cbb5c 100644 --- a/md/learn/index.md +++ b/md/learn/index.md @@ -58,7 +58,7 @@ the right, we value the items on the left more. ## Improvements -```misti +```thp use PDO use Globals::Env @@ -71,9 +71,8 @@ else { die("All 3 db environment variables must be set.") } -match PDO(dbUri dbUser dbPassword) { - Ok(connection) -> { /* db operations */ } - Err(pdoException) -> { /* handle exception */ } -} +match PDO(dbUri dbUser dbPassword) +| Ok(connection) { /* db operations */ } +| Err(pdoException) { /* handle exception */ } ``` diff --git a/static/js/prism.thp.js b/static/js/prism.thp.js index 6d2c390..6122aa2 100644 --- a/static/js/prism.thp.js +++ b/static/js/prism.thp.js @@ -15,7 +15,7 @@ Prism.languages.thp = { pattern: /(["])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, greedy: true, }, - "keyword": /\b(?:break|catch|continue|do|else|elif|finally|for|fun|if|in|fn|nil|return|throw|try|while|val|var|type|match|with|of|abstract|class|interface|private|public|override|open)\b/, + "keyword": /\b(?:static|const|enum|loop|use|break|catch|continue|do|else|finally|for|fun|if|in|fn|nil|return|throw|try|while|val|var|type|match|with|of|abstract|class|interface|private|public|override|open)\b/, "number": /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i, "operator": /[<>]=?|[!=]=?=?|--?|\$|\+\+?|&&?|\|\|?|[?*/~^%]/, "punctuation": /[{}[\];(),.]/, diff --git a/static/template.html b/static/template.html index 6c845c0..6158f88 100644 --- a/static/template.html +++ b/static/template.html @@ -58,5 +58,8 @@ {{markdown}} + + + \ No newline at end of file