Closed gucong3000 closed 6 years ago
Merging #26 into master will not change coverage. The diff coverage is
100%
.
@@ Coverage Diff @@
## master #26 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 11 13 +2
Lines 250 258 +8
=====================================
+ Hits 250 258 +8
Impacted Files | Coverage Δ | |
---|---|---|
index.js | 100% <100%> (ø) |
:arrow_up: |
parse.js | 100% <100%> (ø) |
:arrow_up: |
is-html.js | 100% <100%> (ø) |
|
languages.js | 100% <100%> (ø) |
|
parser.js | 100% <100%> (ø) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update eacae3e...5f2b1a9. Read the comment docs.
@shinnn
I used a new scheme to determine whether the file is XML.
I use regular expressions to determine if the source of the file is XML.
However, it is not valid for empty files.
I suggest that before applying the XML file to stylelint
, determine if it contains <xsl:stylesheet>
What do you mean by "empty files"?
At least the following code doesn't throw any errors.
const postcss = require('postcss');
const result = postcss().process('', {
syntax: require('postcss-syntax'),
from: '/path/to/example.xml'
});
What do you mean by "empty files"?
Empty string source.
*.xml
is the only exception because this is the case in the regular, but the XML format supported by vscode has many other extensions, just like: .svg, .atom .mxml, .xhvml, xvml, xvm, I can't write all of them into this regular, because there are so many.
const postcss = require('postcss');
const result = postcss().process('', {
syntax: require('postcss-syntax'),
// empty source `*.svg` file will berak postcss-syntax
from: '/path/to/example.svg'
});
Post https://github.com/gucong3000/postcss-syntax/pull/26#issuecomment-396505696 first. https://github.com/gucong3000/postcss-syntax/pull/26#issuecomment-396488882 was extremely confusing to me.
I can't write all of them into this regular, because there are so many.
Could you at least support all the XML-related extensions you know currently?
In addition to XSL, other XML is actually not supported by us because they are not style files. I'm very puzzled, why should we apply a style-independent file to a tool that handles styles?
I found that there are about 100+ extensions for XML format, but in fact we only support one (XSL).
@gucong3000 What is blocking this from being merged?
What is blocking this from being merged?
Some integration test runs failed: | packages | version | build |
---|---|---|---|
postcss-syntax | |||
postcss-html | |||
postcss-markdown | |||
postcss-jsx | |||
postcss-styled |
Replace with #28
css
for other unknown file extensionhttps://github.com/stylelint/stylelint/issues/3328#issuecomment-396301689