Skip to content

Regex test on challenge doesn't allow no semi-colon #43536

Closed

Description

@moT01

From chat:

Hello everyone, I found a small problem with this question. When I add margin: auto in the last line, it must add ";", otherwise I cannot pass the question (but browsing works). Does it need to be resolve?

The question: https://www.freecodecamp.org/learn/responsive-web-design/applied-visual-design/center-an-element-horizontally-using-the-margin-property

It's a minor edge case, I wouldn't object to a fix. The file is here. I suppose the regex would need to check if it ends with ; or some space and }. Also, there's no check making sure the property is in the div. We could probably add a check for that while we're at it.

Activity

  1. added
    scope: curriculum
    status: waiting triage
    help wanted
    and removed
    status: waiting triage
    on Sep 22, 2021
  2. ShaunSHamilton commented on Sep 22, 2021

    @ShaunSHamilton
    Member

    Prime opportunity to use CSSHelp

    An issue with the help wanted or first timers only label is open for contribution. The first comprehensive PR created will be reviewed and merged. We typically do not assign issues to anyone other than long-time contributors.

    If you would like to contribute, and have not read the contributors docs, please do so here: https://contribute.freecodecamp.org/#/

    If you have any issues with contributing, be sure to join us on the contributors channel, or on the contributors sub-forum

  3. added a commit that references this issue on Sep 23, 2021
  4. jamesgeer commented on Sep 23, 2021

    @jamesgeer
    Contributor

    Hi @moT01, I've opened a pr regarding this issue.

    I tried implementing a replacement code assessment to replace the regex, but the test cases always failed. (for me atleast).

    For example, I tried:

    assert($('div').css('margin') == 'auto');
    

    But it always failed. The above is certainly easier to read than Regex!

    Is there a reason this works in this file and not the issue file?

    (Sorry if I'm missing something obious!)

  5. added 3 commits that reference this issue on Sep 23, 2021
  6. added a commit that references this issue on Oct 2, 2021
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

    help wantedscope: curriculum

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions