Commit db0a169
authored
fix: correct CSS error column numbers when
* fix: correct CSS error column numbers when <style> and content are on the same line
Plumb text node position through CdataMatcher to the CSS tokenizer so
that column numbers reflect the actual CSS content position, not the
opening tag position. Includes test case for same-line style+CSS.
Fixes #40424
* fix: use tag line + content column for CSS error positions
Use the tag's line number (line_col_) but the content's column
(content_line_col) in MatchCss. This preserves correct line numbering
for multi-line stylesheets while fixing column offsets when CSS content
is on the same line as the <style> tag.
Also corrects the expected test output to match actual validator output.<style> and content are on the same line (#40490)1 parent f45b5ec commit db0a169
3 files changed
Lines changed: 70 additions & 7 deletions
File tree
- validator
- cpp/engine
- testdata/feature_tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1953 | 1953 | | |
1954 | 1954 | | |
1955 | 1955 | | |
| 1956 | + | |
| 1957 | + | |
| 1958 | + | |
1956 | 1959 | | |
1957 | | - | |
| 1960 | + | |
| 1961 | + | |
1958 | 1962 | | |
1959 | 1963 | | |
1960 | 1964 | | |
1961 | 1965 | | |
1962 | 1966 | | |
1963 | 1967 | | |
1964 | 1968 | | |
1965 | | - | |
| 1969 | + | |
| 1970 | + | |
1966 | 1971 | | |
1967 | 1972 | | |
1968 | 1973 | | |
| |||
2896 | 2901 | | |
2897 | 2902 | | |
2898 | 2903 | | |
2899 | | - | |
| 2904 | + | |
| 2905 | + | |
2900 | 2906 | | |
2901 | 2907 | | |
2902 | 2908 | | |
| |||
2932 | 2938 | | |
2933 | 2939 | | |
2934 | 2940 | | |
2935 | | - | |
| 2941 | + | |
| 2942 | + | |
2936 | 2943 | | |
2937 | 2944 | | |
2938 | 2945 | | |
| |||
3100 | 3107 | | |
3101 | 3108 | | |
3102 | 3109 | | |
3103 | | - | |
| 3110 | + | |
| 3111 | + | |
3104 | 3112 | | |
3105 | 3113 | | |
3106 | 3114 | | |
3107 | 3115 | | |
| 3116 | + | |
| 3117 | + | |
| 3118 | + | |
| 3119 | + | |
3108 | 3120 | | |
3109 | | - | |
| 3121 | + | |
3110 | 3122 | | |
3111 | 3123 | | |
3112 | 3124 | | |
| |||
5843 | 5855 | | |
5844 | 5856 | | |
5845 | 5857 | | |
| 5858 | + | |
| 5859 | + | |
| 5860 | + | |
| 5861 | + | |
| 5862 | + | |
| 5863 | + | |
| 5864 | + | |
| 5865 | + | |
| 5866 | + | |
| 5867 | + | |
5846 | 5868 | | |
5847 | 5869 | | |
5848 | | - | |
| 5870 | + | |
5849 | 5871 | | |
5850 | 5872 | | |
5851 | 5873 | | |
| |||
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
0 commit comments