diff --git a/js-css-interop.reb b/js-css-interop.reb index eb98b10..0bbd627 100644 --- a/js-css-interop.reb +++ b/js-css-interop.reb @@ -56,7 +56,7 @@ detect-automime: func [ "https://" [ hostname: "raw.githubusercontent.com" "/" to | - hostname: "gitlab.com" "/" thru "/" thru "/" opt "-/" "raw/" to + hostname: "gitlab.com" "/" thru "/" thru "/" try "-/" "raw/" to ] ] then [ if hostname <> js-eval "window.location.hostname" [ diff --git a/main.reb b/main.reb index 2c92da0..1dc4a63 100644 --- a/main.reb +++ b/main.reb @@ -94,7 +94,7 @@ export main: adapt :console [ ; let autorun: null let importing: false - parse system.options.args [maybe some [ + parse system.options.args [try some [ start: || ; local, remote, tracing_on, git_commit not passed through by the diff --git a/replpad.reb b/replpad.reb index ea70624..ec7b415 100644 --- a/replpad.reb +++ b/replpad.reb @@ -283,7 +283,7 @@ replpad-write: func [ ; https://developer.mozilla.org/en-US/docs/Web/CSS/white-space let url-rule: [ - "http" opt "s" ":" to ["]" | ")" | {"} | "'" | space | newline | end] + "http" try "s" ":" to ["]" | ")" | {"} | "'" | space | newline | end] ] ; UPARSE is still orders of magnitude slower than native PARSE. Until that @@ -291,7 +291,7 @@ replpad-write: func [ let url parse3 param: copy param [ - maybe some [ + try some [ change '< ("<") | change '> (">") | change '& ("&") @@ -393,7 +393,7 @@ CORSify-gitlab-port: func [ "/" emit user: between "/" emit repo: between "/" - [opt "-/"] ; TBD: figure out what this is for, but skip for now + [try "-/"] ; TBD: figure out what this is for, but skip for now "raw/" emit branch: between "/" emit file_path: between diff --git a/tests/interactive.test.reb b/tests/interactive.test.reb index c5f11a6..84931d6 100644 --- a/tests/interactive.test.reb +++ b/tests/interactive.test.reb @@ -150,9 +150,9 @@ k: ok: okay: function [ steps: parse steps [ label: issue! - opt bug: integer! ; optional GitHub issue number + try bug: integer! ; optional GitHub issue number description: across [some text!] (print description) - opt [code: group! (do as block! code)] + try [code: group! (do as block! code)] accept ] else [ fail "Problem in STEPS parsing"