Skip to content

Update 'all on one page' snippets #51

Open

Description

@ljcl

The querystrings.js on the github page differs slightly from the source on github, and returns an error when run whereas the source does not.

Might be worth an update!

Activity

  1. bgrins commented on Sep 8, 2014

    @bgrins
    Owner

    The code, or the screenshot? I think the code is in sync unless if I'm missing something

  2. hvsw commented on Sep 8, 2014

    @hvsw
    Contributor

    The searchvalue argument in replace function. "//g" and "/+/g"

    return { "Key": qs.split("=")[0], "Value": qs.split("=")[1], "Pretty Value": decodeURIComponent(qs.split("=")[1]).replace(//g," ") }

    return { "Key": qs.split("=")[0], "Value": qs.split("=")[1], "Pretty Value": decodeURIComponent(qs.split("=")[1]).replace(/+/g," ") }

  3. bgrins commented on Sep 8, 2014

    @bgrins
    Owner

    Ah I see that now, thanks. Maybe is a bug with the rakefile at: https://github.com/bgrins/devtools-snippets/blob/master/Rakefile, because gh-pages is up to date after running rake build

  4. bgrins commented on Sep 8, 2014

    @bgrins
    Owner

    Hm, well running pygmentize -f html snippets/querystringvalues/querystringvalues.js seems to produce the correct output so it's not that

  5. bgrins commented on Sep 8, 2014

    @bgrins
    Owner

    And it appears OK in the snippets.json file: https://bgrins.github.io/devtools-snippets/snippets.json

  6. bgrins commented on Sep 9, 2014

    @bgrins
    Owner

    Well, I'm not sure why but the /+/g is still there in the markup variable before the call to with_markup = template.gsub(regex, markup) in the rakefile:

    with_markup = template.gsub(regex, markup)
    . After this line, with_markup seems to be //g as far as I can tell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions