Skip to content

Fix computation of blacklisted_cdata_regex#7301

Merged
Gregable merged 1 commit intoampproject:masterfrom
Gregable:validator-rollup
Feb 2, 2017
Merged

Fix computation of blacklisted_cdata_regex#7301
Gregable merged 1 commit intoampproject:masterfrom
Gregable:validator-rollup

Conversation

@Gregable
Copy link
Copy Markdown
Member

@Gregable Gregable commented Feb 2, 2017

Fix computation of blacklisted_cdata_regex as well as code which was hiding the error in our tests.

This issue was being hidden by the fact that our test wasn't showing us the errors which this rule was supposed to catch (see incorrect_custom_style.out). This made me nervous that we had not been running these blacklist regexps at all.

As it turns out, we only ran them if the cdata section had no other errors. This was a holdover from a period when we had two ways to catch the same issue in cdata, so we skipped emitting the regexp issues if we had parser issues. That situation no longer is the case, so we can start emitting those errors again, which in turn is a slight code simplification.

The good news is that this has no effect on which docs are valid or invalid.

Addresses #7246

@Gregable Gregable merged commit 7845df7 into ampproject:master Feb 2, 2017
@Gregable Gregable deleted the validator-rollup branch February 2, 2017 00:07
torch2424 pushed a commit to torch2424/amphtml that referenced this pull request Feb 14, 2017
mrjoro pushed a commit to mrjoro/amphtml that referenced this pull request Apr 28, 2017
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.

3 participants