File tree Expand file tree Collapse file tree 3 files changed +32
-7
lines changed Expand file tree Collapse file tree 3 files changed +32
-7
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,13 @@ const defaultConfig = {
3232 lang : "css" ,
3333 } ,
3434 {
35- test : / \. (?: [ s x ] ? h t m l ? | [ s x ] h t | v u e | u x | m a r k d o w n | m d | p h p ) $ / i,
35+ // *.xslt? https://msdn.microsoft.com/en-us/library/ms764661(v=vs.85).aspx
36+ // *.vue https://vue-loader.vuejs.org/spec.html
37+ // *.ux https://doc.quickapp.cn/framework/source-file.html
38+ // `*.xml` Just for fault tolerance, XML is not supported except XSLT
39+ // `*.htm`, `*.*htm`
40+ // `*.html`, `*.*html`
41+ test : / \. (?: \w * h t m l ? | x (?: h t | m l | s l t ? ) | m a r k d o w n | m d | p h p | v u e | u x ) $ / i,
3642 extract : "html" ,
3743 } ,
3844 {
Original file line number Diff line number Diff line change 11{
22 "name" : " postcss-syntax" ,
3- "version" : " 0.27 .0" ,
3+ "version" : " 0.28 .0" ,
44 "description" : " Automatically switch PostCSS syntax by file extensions" ,
55 "repository" : {
66 "type" : " git" ,
3939 "mocha" : " ^5.2.0" ,
4040 "nyc" : " ^12.0.2" ,
4141 "postcss" : " ^6.0.22" ,
42- "postcss-html" : " >=0.27 .0" ,
43- "postcss-jsx" : " >=0.27 .0" ,
42+ "postcss-html" : " >=0.28 .0" ,
43+ "postcss-jsx" : " >=0.28 .0" ,
4444 "postcss-less" : " ^2.0.0" ,
45- "postcss-markdown" : " >=0.27 .0" ,
45+ "postcss-markdown" : " >=0.28 .0" ,
4646 "postcss-safe-parser" : " ^3.0.1" ,
4747 "postcss-scss" : " ^1.0.5" ,
4848 "sugarss" : " ^1.0.1"
Original file line number Diff line number Diff line change @@ -52,11 +52,30 @@ describe("default config rules", () => {
5252 it ( "foo.htm" , ( ) => {
5353 expect ( getRule ( "foo.htm" ) ) . to . haveOwnProperty ( "extract" , "html" ) ;
5454 } ) ;
55+ it ( "foo.shtml" , ( ) => {
56+ expect ( getRule ( "foo.shtml" ) ) . to . haveOwnProperty ( "extract" , "html" ) ;
57+ } ) ;
5558 it ( "foo.xht" , ( ) => {
5659 expect ( getRule ( "foo.xht" ) ) . to . haveOwnProperty ( "extract" , "html" ) ;
5760 } ) ;
58- it ( "foo.shtml" , ( ) => {
59- expect ( getRule ( "foo.shtml" ) ) . to . haveOwnProperty ( "extract" , "html" ) ;
61+ it ( "foo.xhtml" , ( ) => {
62+ expect ( getRule ( "foo.xhtml" ) ) . to . haveOwnProperty ( "extract" , "html" ) ;
63+ } ) ;
64+ it ( "foo.xml" , ( ) => {
65+ // Just for fault tolerance, XML is not supported except XSLT
66+ expect ( getRule ( "foo.xml" ) ) . to . haveOwnProperty ( "extract" , "html" ) ;
67+ } ) ;
68+ it ( "foo.xsl" , ( ) => {
69+ expect ( getRule ( "foo.xsl" ) ) . to . haveOwnProperty ( "extract" , "html" ) ;
70+ } ) ;
71+ it ( "foo.xslt" , ( ) => {
72+ expect ( getRule ( "foo.xslt" ) ) . to . haveOwnProperty ( "extract" , "html" ) ;
73+ } ) ;
74+ it ( "foo.vue" , ( ) => {
75+ expect ( getRule ( "foo.vue" ) ) . to . haveOwnProperty ( "extract" , "html" ) ;
76+ } ) ;
77+ it ( "foo.ux" , ( ) => {
78+ expect ( getRule ( "foo.ux" ) ) . to . haveOwnProperty ( "extract" , "html" ) ;
6079 } ) ;
6180 it ( "foo.php" , ( ) => {
6281 expect ( getRule ( "foo.php" ) ) . to . haveOwnProperty ( "extract" , "html" ) ;
You can’t perform that action at this time.
0 commit comments