Emmet: SugarSS ์ง€์›

์— ๋งŒ๋“  2016๋…„ 03์›” 09์ผ  ยท  5์ฝ”๋ฉ˜ํŠธ  ยท  ์ถœ์ฒ˜: emmetio/emmet

์ด๊ฒƒ์€ ์ „์ฒ˜๋ฆฌ๊ธฐ ๊ตฌ๋ฌธ์— ๋Œ€ํ•œ PostCSS์˜ ์ƒˆ๋กœ์šด/๊ณต์‹์ ์ธ ๋Œ€์•ˆ์ž…๋‹ˆ๋‹ค: https://github.com/postcss/sugarss

๊ฐ€์žฅ ์œ ์šฉํ•œ ๋Œ“๊ธ€

@corysimmons ์ด ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ์‚ฌ์šฉํ•˜์…จ๋‚˜์š”? https://github.com/hudochenkov/Syntax-highlighting-for-PostCSS
์ด ํŒจํ‚ค์ง€์™€ https://github.com/hudochenkov/Syntax-highlighting-for-PostCSS/blob/master/Syntaxes/SugarSS.tmLanguage ํŒŒ์ผ์˜ ์••์ถ•์„ ํ’‰๋‹ˆ๋‹ค.
414์ค„์„ source.css.postcss.sugarss ์—์„œ source.sss

Emmet ํŒจํ‚ค์ง€๋ฅผ ์ถ”์ถœํ–ˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋Ÿฐ ๋‹ค์Œ ํŒŒ์ผ editor.js์—์„œ ์ผ๋ถ€ ์ค„์„ ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค.

382 ํ–‰์—์„œ if ๋ฌธ์ด ์ง„ํ–‰ ์ค‘์ž…๋‹ˆ๋‹ค.

else if (/\b(less|scss|sass|css|stylus|postcss)\b/.test(scope)) {
        // detect CSS-like syntaxes independently,
        // since it may cause collisions with some highlighters
        syntax = RegExp.$1;

        if (syntax === 'postcss') {
            syntax = 'css';
        } else if (syntax === 'sss') { // I added this 3 lines started from else
            syntax = 'sass'; // this
        } // and this

์ด์ œ m0์„ margin: 0์œผ๋กœ ํ™•์žฅํ•ฉ๋‹ˆ๋‹ค(์„ธ๋ฏธ์ฝœ๋ก  ์ œ์™ธ).

๊ทธ๋Ÿฌ๋‚˜ ์ด๊ฒƒ์ด ์—†์œผ๋ฉด ํ™•์žฅ ์—ฌ๋ฐฑ์ด ๋ณ€๊ฒฝ๋ฉ๋‹ˆ๋‹ค. 0;

๋ชจ๋“  5 ๋Œ“๊ธ€

Emmet์€ ๋์— ์„ธ๋ฏธ์ฝœ๋ก ์„ ...

Stylus ๊ตฌ๋ฌธ์„ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๊นŒ ์•„๋‹ˆ๋ฉด Emmet์—์„œ ๊ณต์‹์ ์œผ๋กœ ์ง€์›ํ•˜๊ธฐ ์‹œ์ž‘ํ–ˆ์Šต๋‹ˆ๊นŒ?

@corysimmons ์ด ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ์‚ฌ์šฉํ•˜์…จ๋‚˜์š”? https://github.com/hudochenkov/Syntax-highlighting-for-PostCSS
์ด ํŒจํ‚ค์ง€์™€ https://github.com/hudochenkov/Syntax-highlighting-for-PostCSS/blob/master/Syntaxes/SugarSS.tmLanguage ํŒŒ์ผ์˜ ์••์ถ•์„ ํ’‰๋‹ˆ๋‹ค.
414์ค„์„ source.css.postcss.sugarss ์—์„œ source.sss

Emmet ํŒจํ‚ค์ง€๋ฅผ ์ถ”์ถœํ–ˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋Ÿฐ ๋‹ค์Œ ํŒŒ์ผ editor.js์—์„œ ์ผ๋ถ€ ์ค„์„ ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค.

382 ํ–‰์—์„œ if ๋ฌธ์ด ์ง„ํ–‰ ์ค‘์ž…๋‹ˆ๋‹ค.

else if (/\b(less|scss|sass|css|stylus|postcss)\b/.test(scope)) {
        // detect CSS-like syntaxes independently,
        // since it may cause collisions with some highlighters
        syntax = RegExp.$1;

        if (syntax === 'postcss') {
            syntax = 'css';
        } else if (syntax === 'sss') { // I added this 3 lines started from else
            syntax = 'sass'; // this
        } // and this

์ด์ œ m0์„ margin: 0์œผ๋กœ ํ™•์žฅํ•ฉ๋‹ˆ๋‹ค(์„ธ๋ฏธ์ฝœ๋ก  ์ œ์™ธ).

๊ทธ๋Ÿฌ๋‚˜ ์ด๊ฒƒ์ด ์—†์œผ๋ฉด ํ™•์žฅ ์—ฌ๋ฐฑ์ด ๋ณ€๊ฒฝ๋ฉ๋‹ˆ๋‹ค. 0;

ํ•ด๊ฒฐ ๋ฐฉ๋ฒ• ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค

v2์—์„œ ์‚ฌ์šฉ ๊ฐ€๋Šฅ

์ด ํŽ˜์ด์ง€๊ฐ€ ๋„์›€์ด ๋˜์—ˆ๋‚˜์š”?
0 / 5 - 0 ๋“ฑ๊ธ‰

๊ด€๋ จ ๋ฌธ์ œ

midgethoen picture midgethoen  ยท  8์ฝ”๋ฉ˜ํŠธ

planetoftheweb picture planetoftheweb  ยท  3์ฝ”๋ฉ˜ํŠธ

HeikoMamerow picture HeikoMamerow  ยท  16์ฝ”๋ฉ˜ํŠธ

renatorib picture renatorib  ยท  26์ฝ”๋ฉ˜ํŠธ

deathmood picture deathmood  ยท  15์ฝ”๋ฉ˜ํŠธ