Skip to content

Commit

Permalink
BAM-2585 Fix validator, copyright, and whitespace (#7)
Browse files Browse the repository at this point in the history
* alphabetize validator, fix whitespace, and add valid tag

* update year in copyright statement
  • Loading branch information
Phil Winchester committed Jan 31, 2019
1 parent b1a9380 commit 1368887
Show file tree
Hide file tree
Showing 16 changed files with 48 additions and 41 deletions.
2 changes: 1 addition & 1 deletion extensions/amp-smartlinks/0.1/amp-smartlinks.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2018 The AMP HTML Authors. All Rights Reserved.
* Copyright 2019 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion extensions/amp-smartlinks/0.1/constants.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2018 The AMP HTML Authors. All Rights Reserved.
* Copyright 2019 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion extensions/amp-smartlinks/0.1/link-rewriter/constants.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2018 The AMP HTML Authors. All Rights Reserved.
* Copyright 2019 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2018 The AMP HTML Authors. All Rights Reserved.
* Copyright 2019 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2018 The AMP HTML Authors. All Rights Reserved.
* Copyright 2019 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2018 The AMP HTML Authors. All Rights Reserved.
* Copyright 2019 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2018 The AMP HTML Authors. All Rights Reserved.
* Copyright 2019 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion extensions/amp-smartlinks/0.1/linkmate-options.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2018 The AMP HTML Authors. All Rights Reserved.
* Copyright 2019 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion extensions/amp-smartlinks/0.1/linkmate.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2018 The AMP HTML Authors. All Rights Reserved.
* Copyright 2019 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion extensions/amp-smartlinks/0.1/test/test-amp-smartlinks.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2018 The AMP HTML Authors. All Rights Reserved.
* Copyright 2019 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion extensions/amp-smartlinks/0.1/test/test-link-rewriter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2018 The AMP HTML Authors. All Rights Reserved.
* Copyright 2019 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion extensions/amp-smartlinks/0.1/test/test-linkmate.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2018 The AMP HTML Authors. All Rights Reserved.
* Copyright 2019 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2018 The AMP HTML Authors. All Rights Reserved.
Copyright 2019 The AMP HTML Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Expand All @@ -12,7 +12,7 @@
-->
<!--
Test Description:
Valid amp-smartlinks tag
amp-smartlinks tag
-->
<!doctype html>
<html >
Expand All @@ -25,6 +25,7 @@
<script async src="https://cdn.ampproject.org/v0.js"></script>
</head>
<body>
<!-- Valid -->
<amp-smartlinks
layout="nodisplay"
nrtv-account-name="examplepublisher"
Expand Down
38 changes: 20 additions & 18 deletions extensions/amp-smartlinks/0.1/test/validator-amp-smartlinks.out
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
PASS
| <!--
| Copyright 2018 The AMP HTML Authors. All Rights Reserved.
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
| http://www.apache.org/licenses/LICENSE-2.0
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS-IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the license.
| Copyright 2019 The AMP HTML Authors. All Rights Reserved.
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
| http://www.apache.org/licenses/LICENSE-2.0
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS-IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the license.
| -->
| <!--
| Test Description:
| Valid amp-smartlinks tag
| Test Description:
| amp-smartlinks tag
| -->
| <!doctype html>
| <html ⚡>
| <head>
| <meta charset="utf-8">
| <link rel="canonical" href="./regular-html-version.html">
| <meta name="viewport" content="width=device-width,minimum-scale=1">
| <style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
| <script async custom-element="amp-smartlinks" src="https://cdn.ampproject.org/v0/amp-smartlinks-0.1.js"></script>
| <script async src="https://cdn.ampproject.org/v0.js"></script>
| <meta charset="utf-8">
| <link rel="canonical" href="./regular-html-version.html">
| <meta name="viewport" content="width=device-width,minimum-scale=1">
| <style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
| <script async custom-element="amp-smartlinks" src="https://cdn.ampproject.org/v0/amp-smartlinks-0.1.js"></script>
| <script async src="https://cdn.ampproject.org/v0.js"></script>
| </head>
| <body>
| <!-- Valid -->
| <amp-smartlinks
| layout="nodisplay"
| nrtv-account-name="examplepublisher"
Expand Down
2 changes: 1 addition & 1 deletion extensions/amp-smartlinks/amp-smartlinks.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!---
Copyright 2018 The AMP HTML Authors. All Rights Reserved.
Copyright 2019 The AMP HTML Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
20 changes: 12 additions & 8 deletions extensions/amp-smartlinks/validator-amp-smartlinks.protoascii
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2018 The AMP HTML Authors. All Rights Reserved.
# Copyright 2019 The AMP HTML Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -30,21 +30,25 @@ tags: { # <amp-smartlinks>
tag_name: "AMP-SMARTLINKS"
requires_extension: "amp-smartlinks"
attrs: {
name: "nrtv-account-name"
mandatory: true
name: "exclusive-links"
value: "true"
value: "false"
}
attrs: {
name: "linkmate"
mandatory: true
name: "link-attribute"
}
attrs: {
name: "exclusive-links"
name: "link-selector"
}
attrs: {
name: "link-attribute"
name: "linkmate"
mandatory: true
value: "true"
value: "false"
}
attrs: {
name: "link-selector"
name: "nrtv-account-name"
mandatory: true
}
attr_lists: "extended-amp-global"
amp_layout: {
Expand Down

0 comments on commit 1368887

Please sign in to comment.