Skip to content
This repository has been archived by the owner on Oct 16, 2019. It is now read-only.

Comments parsed as actual code by challenge tests #165

Closed
ZebulanStanphill opened this issue Jun 8, 2018 · 2 comments
Closed

Comments parsed as actual code by challenge tests #165

ZebulanStanphill opened this issue Jun 8, 2018 · 2 comments
Labels
help wanted Open for everyone. You do not need permission to work on these. May need familiarity with codebase.

Comments

@ZebulanStanphill
Copy link

ZebulanStanphill commented Jun 8, 2018

The tests on challenges parse comments as if they were actual code.

Take this challenge for example:

https://learn.freecodecamp.org/responsive-web-design/css-grid/create-a-column-gap-using-grid-column-gap

Using the following code, I can pass the test (which checks for grid-column-gap to be set to 20px), even though grid-column-gap: 20px is in a comment.

<style>
  .d1{background:LightSkyBlue;}
  .d2{background:LightSalmon;}
  .d3{background:PaleTurquoise;}
  .d4{background:LightPink;}
  .d5{background:PaleGreen;}
  
  .container {
    font-size: 40px;
    min-height: 300px;
    width: 100%;
    background: LightGray;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr 1fr;
    /* add your code below this line */
    grid-column-gap: 10px;
    // grid-column-gap: 20px;
    /* add your code above this line */
  }
</style>
  
<div class="container">
  <div class="d1">1</div>
  <div class="d2">2</div>
  <div class="d3">3</div>
  <div class="d4">4</div>
  <div class="d5">5</div>
</div>

This was also an issue on the old version of the website. See freeCodeCamp/freeCodeCamp#15134

@raisedadead raisedadead added the help wanted Open for everyone. You do not need permission to work on these. May need familiarity with codebase. label Jun 8, 2018
@coolshaurya
Copy link

This happens because you need to use /* YOUR COMMENT HERE */ syntax when adding CSS comments. CSS does not have the // COMMENT HERE syntax.

@ZebulanStanphill
Copy link
Author

@coolshaurya Thanks for pointing that out. I forgot about that. It looks like there is no problem after all, so I will now close this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Open for everyone. You do not need permission to work on these. May need familiarity with codebase.
Projects
None yet
Development

No branches or pull requests

3 participants