Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow the new boilerplate (spec file change + also_requires feature). #1345

Merged
merged 1 commit into from
Jan 7, 2016
Merged

Allow the new boilerplate (spec file change + also_requires feature). #1345

merged 1 commit into from
Jan 7, 2016

Conversation

powdercloud
Copy link
Contributor

  • no deprecation warnings for now
  • old and new boilerplate cannot be mixed (to ensure this, I'm adding the also_requires
    facility).
  • mandatory whitespace in the boilerplate is matched against \s+, so
    it's OK to put newlines tabs etc. into there

The Google doc describing the new boilerplate (https://docs.google.com/document/d/1gZFaKvcDffceJNaI3bYfuYPtYU5u2y6UhE5wBPTsJ9w/edit#) also specifies a more permissive matching but this requires parsing the CSS. We'll want to do this eventually, but not in this change, hence just something with a not super complicated regex that's good enough so we can live with it for now.

- no deprecation warnings for now
- old and new boilerplate cannot be mixed (to ensure this, I'm adding the also_requires
  facility).
- mandatory whitespace in the boilerplate is matched against \s+, so
  it's OK to put newlines tabs etc. into there

The Google doc describing the new boilerplate (https://docs.google.com/document/d/1gZFaKvcDffceJNaI3bYfuYPtYU5u2y6UhE5wBPTsJ9w/edit#) also specifies a more permissive matching but this requires parsing the CSS. We'll want to do this eventually, but not in this change, hence just something with a not super complicated regex that's good enough so we can live with it for now.
@Gregable Gregable changed the title Allow the new boilerplate (spec file chng + also_requires feature). Allow the new boilerplate (spec file change + also_requires feature). Jan 7, 2016
@Gregable Gregable added LGTM and removed NEEDS REVIEW labels Jan 7, 2016
powdercloud added a commit that referenced this pull request Jan 7, 2016
Allow the new boilerplate (spec file change + also_requires feature).
@powdercloud powdercloud merged commit 608cd10 into ampproject:master Jan 7, 2016
@powdercloud powdercloud deleted the new-boilerplate branch January 7, 2016 23:56
@camelburrito
Copy link
Contributor

does this mean that i can change all example files to use the new boilerplate?

@Gregable
Copy link
Member

Gregable commented Jan 8, 2016

Probably not. The tests are still running against the released minified version of the validator, yes? That doesn't have this change yet. We'll probably hold off allowing it until the cdn.ampproject.org backends pick up the change as well, so that publishers don't roll something out which validates in their browser but doesn't validate on the cdn.

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

Successfully merging this pull request may close these issues.

4 participants