Skip to content

Commit

Permalink
Merge pull request #19 from teaching-the-art-of-fp/bugfix1-playground
Browse files Browse the repository at this point in the history
Fixing URL pattern
  • Loading branch information
hannelita authored Jan 8, 2021
2 parents dae2637 + 3bd0b76 commit ff48fff
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/app/learnocaml_common.ml
Original file line number Diff line number Diff line change
Expand Up @@ -907,6 +907,9 @@ module Editor_button (E : Editor_info) = struct
let exercise_id = match Url.Current.path with
| "" :: "exercises" :: p | "exercises" :: p ->
String.concat "/" (List.map Url.urldecode (List.filter ((<>) "") p))
| "" :: "playground" :: p | "exercises" :: p ->
String.concat "/" (List.map Url.urldecode (List.filter ((<>) "") p))
| exception Not_found -> "other"
| _ -> arg "id"
in
let url = Js.string @@ Js.to_string (eval_unsafe "window.location.protocol") ^
Expand Down

0 comments on commit ff48fff

Please sign in to comment.