Skip to content

Commit

Permalink
Exclude transformed AMP from spec until SSR implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
westonruter committed Feb 20, 2019
1 parent 636a843 commit 51d81ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 133 deletions.
4 changes: 4 additions & 0 deletions bin/amphtml-update.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,10 @@ def ParseRules(out_dir):
if tag_spec.HasField('deprecation'):
continue

# Ignore transformed AMP for now.
if '(transformed)' in tag_spec.spec_name:
continue

# Handle the special $REFERENCE_POINT tag
if '$REFERENCE_POINT' == tag_spec.tag_name:
reference_points[ tag_spec.spec_name ] = GetTagSpec(tag_spec, attr_lists)
Expand Down
133 changes: 0 additions & 133 deletions includes/sanitizers/class-amp-allowed-tags-generated.php
Original file line number Diff line number Diff line change
Expand Up @@ -9649,15 +9649,6 @@ class AMP_Allowed_Tags_Generated {
'unique' => true,
),
),
array(
'attr_spec_list' => array(),
'tag_spec' => array(
'mandatory_parent' => 'head',
'spec_name' => 'noscript enclosure for boilerplate (transformed)',
'spec_url' => 'https://github.com/ampproject/amphtml/blob/master/spec/amp-boilerplate.md',
'unique' => true,
),
),
array(
'attr_spec_list' => array(),
'tag_spec' => array(
Expand Down Expand Up @@ -13979,65 +13970,6 @@ class AMP_Allowed_Tags_Generated {
'unique' => true,
),
),
array(
'attr_spec_list' => array(
'amp-custom' => array(
'mandatory' => true,
'value' => array(
'',
),
),
'nonce' => array(),
'type' => array(
'value_casei' => array(
'text/css',
),
),
),
'cdata' => array(
'blacklisted_cdata_regex' => array(
'error_message' => 'CSS !important',
'regex' => '!important',
),
'css_spec' => array(
'allowed_at_rules' => array(
'font-face',
'keyframes',
'media',
'page',
'supports',
),
'declaration' => array(),
'font_url_spec' => array(
'allow_empty' => true,
'protocol' => array(
'https',
'http',
'data',
),
),
'image_url_spec' => array(
'allow_empty' => true,
'protocol' => array(
'https',
'http',
'data',
'absolute',
),
),
'validate_keyframes' => false,
),
'max_bytes' => 50000,
'max_bytes_spec_url' => 'https://www.ampproject.org/docs/reference/spec#maximum-size',
'url_bytes_included' => false,
),
'tag_spec' => array(
'mandatory_parent' => 'head',
'spec_name' => 'style amp-custom (transformed)',
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#stylesheets',
'unique' => true,
),
),
array(
'attr_spec_list' => array(
'amp-boilerplate' => array(
Expand All @@ -14060,27 +13992,6 @@ class AMP_Allowed_Tags_Generated {
'unique' => true,
),
),
array(
'attr_spec_list' => array(
'amp-boilerplate' => array(
'dispatch_key' => 3,
'mandatory' => true,
'value' => array(
'',
),
),
'nonce' => array(),
),
'cdata' => array(
'cdata_regex' => '\\s*body\\s*{\\s*-webkit-animation:\\s*-amp-start\\s+8s\\s+steps\\(1,\\s*end\\)\\s+0s\\s+1\\s+normal\\s+both;\\s*-moz-animation:\\s*-amp-start\\s+8s\\s+steps\\s*\\(1\\s*,\\s*end\\s*\\)\\s+0s\\s+1\\s+normal\\s+both;\\s*-ms-animation:\\s*-amp-start\\s+8s\\s+steps\\s*\\(1\\s*,\\s*end\\s*\\)\\s+0s\\s+1\\s+normal\\s+both;\\s*animation:\\s*-amp-start\\s+8s\\s+steps\\(1,\\s*end\\)\\s+0s\\s+1\\s+normal\\s+both;?\\s*}\\s*@-webkit-keyframes\\s+-amp-start\\s*{\\s*from\\s*{\\s*visibility:\\s*hidden;?\\s*}\\s*to\\s*{\\s*visibility:\\s*visible;?\\s*}\\s*}\\s*@-moz-keyframes\\s+-amp-start\\s*{\\s*from\\s*{\\s*visibility:\\s*hidden;?\\s*}\\s*to\\s*{\\s*visibility:\\s*visible;?\\s*}\\s*}\\s*@-ms-keyframes\\s+-amp-start\\s*{\\s*from\\s*{\\s*visibility:\\s*hidden;?\\s*}\\s*to\\s*{\\s*visibility:\\s*visible;?\\s*}\\s*}\\s*@-o-keyframes\\s+-amp-start\\s*{\\s*from\\s*{\\s*visibility:\\s*hidden;?\\s*}\\s*to\\s*{\\s*visibility:\\s*visible;?\\s*}\\s*}\\s*@keyframes\\s+-amp-start\\s*{\\s*from\\s*{\\s*visibility:\\s*hidden;?\\s*}\\s*to\\s*{\\s*visibility:\\s*visible;?\\s*}\\s*}\\s*',
),
'tag_spec' => array(
'mandatory_parent' => 'head',
'spec_name' => 'head > style[amp-boilerplate] (transformed)',
'spec_url' => 'https://github.com/ampproject/amphtml/blob/master/spec/amp-boilerplate.md',
'unique' => true,
),
),
array(
'attr_spec_list' => array(
'amp-boilerplate' => array(
Expand All @@ -14104,28 +14015,6 @@ class AMP_Allowed_Tags_Generated {
'unique' => true,
),
),
array(
'attr_spec_list' => array(
'amp-boilerplate' => array(
'dispatch_key' => 3,
'mandatory' => true,
'value' => array(
'',
),
),
'nonce' => array(),
),
'cdata' => array(
'cdata_regex' => '\\s*body\\s*{\\s*-webkit-animation:\\s*none;\\s*-moz-animation:\\s*none;\\s*-ms-animation:\\s*none;\\s*animation:\\s*none;?\\s*}\\s*',
),
'tag_spec' => array(
'mandatory_ancestor' => 'head',
'mandatory_parent' => 'noscript',
'spec_name' => 'noscript > style[amp-boilerplate] (transformed)',
'spec_url' => 'https://github.com/ampproject/amphtml/blob/master/spec/amp-boilerplate.md',
'unique' => true,
),
),
array(
'attr_spec_list' => array(
'amp-keyframes' => array(
Expand Down Expand Up @@ -14163,28 +14052,6 @@ class AMP_Allowed_Tags_Generated {
'unique' => true,
),
),
array(
'attr_spec_list' => array(
'amp-runtime' => array(
'dispatch_key' => 3,
'mandatory' => true,
'value' => array(
'',
),
),
'i-amphtml-version' => array(
'mandatory' => true,
'value_regex' => '^\\d{15}|latest$',
),
),
'tag_spec' => array(
'mandatory' => true,
'mandatory_parent' => 'head',
'spec_name' => 'style[amp-runtime] (transformed)',
'spec_url' => 'https://www.ampproject.org/docs/reference/spec#stylesheets',
'unique' => true,
),
),
),
'sub' => array(
array(
Expand Down

0 comments on commit 51d81ab

Please sign in to comment.