ampproject / ampproject/amphtml
Validator returns incorrect column number when opening <style> is on the same line — marked as a Bug and currently Open.
- Dominant language
- JavaScript
- Stars
- 14.9k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
### Description
What the issue is
The issue is titled: “Validator returns incorrect column number when opening is on the same line”.
GitHub
+1
It’s classified as a Bug and its status is Open.
[GitHub](https://github.com/ampproject/amphtml/issues?utm_source=chatgpt.com)
The problem arises when a <style> tag in an AMP HTML document begins on the same line as some preceding code — and then, when the built-in validator (the AMP validator) reports an error or warning related to that <style> tag, the column number indicated in the error message is incorrect (i.e. shifted/wrong).
### Reproduction Steps
What the issue is
The issue is titled: “Validator returns incorrect column number when opening <style> is on the same line”.
GitHub
+1
It’s classified as a Bug and its status is Open.
[GitHub](https://github.com/ampproject/amphtml/issues?utm_source=chatgpt.com)
The problem arises when a <style> tag in an AMP HTML document begins on the same line as some preceding code — and then, when the built-in validator (the AMP validator) reports an error or warning related to that <style> tag, the column number indicated in the error message is incorrect (i.e. shifted/wrong).
### Relevant Logs
```shell
```
### Browser(s) Affected
_No response_
### OS(s) Affected
_No response_
### Device(s) Affected
_No response_
### AMP Version Affected
_No response_
Contributor guide
Research direction
Start with the built-in AMP validator and reproduce the issue using an AMP HTML document where an opening tag shares a line with preceding code. Trace how the validator calculates the reported column, then verify that warnings or errors for the style tag identify the correct column.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100