{"name":"postcss-markdown","version":"0.26.0","description":"PostCSS syntax for parsing Markdown","repository":{"type":"git","url":"git+https://github.com/gucong3000/postcss-markdown.git"},"keywords":["postcss","syntax","markdown","html","css","less","sass","scss","sss","sugarss"],"author":{"name":"gucong"},"license":"MIT","bugs":{"url":"https://github.com/gucong3000/postcss-markdown/issues"},"homepage":"https://github.com/gucong3000/postcss-markdown#readme","nyc":{"reporter":["lcov","text"],"all":true,"cache":true,"check-coverage":true},"scripts":{"test":"nyc mocha --no-timeouts"},"dependencies":{"remark":"^9.0.0","unist-util-find-all-after":"^1.0.2"},"peerDependencies":{"postcss":">=5.0.0","postcss-syntax":">=0.26.0"},"devDependencies":{"chai":"^4.1.2","codecov":"^3.0.2","mocha":"^5.2.0","nyc":"^11.8.0","postcss":"^6.0.22","postcss-html":">=0.26.0","postcss-less":"^1.1.5","postcss-scss":"^1.0.5","postcss-syntax":">=0.26.0","sugarss":"^1.0.1"},"_id":"postcss-markdown@0.26.0","_shasum":"ad98f7861849f6a0e20a4e5829171abbe204b365","_from":".","_npmVersion":"3.10.10","_nodeVersion":"10.0.0","_npmUser":{"name":"gucong","email":"gucong@gmail.com"},"dist":{"shasum":"ad98f7861849f6a0e20a4e5829171abbe204b365","tarball":"http://registry-npm.ywwl.com/postcss-markdown/download/postcss-markdown-0.26.0.tgz","fileCount":6,"unpackedSize":6985,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbC5TMCRA9TVsSAnZWagAAn5sP/izbZAbRfrszLJVfUuO2\nRd4CvSdWxRTovuvdzzYrhPh+gouKRe6ofQWGUTjMtyFrqigrYcq8RUB0sY+N\nyYm85a4Ca/0u9BGi3vhOC92e0DB0Mw29f+jRg4JpsinRIKjfqqhGzOWjWXRx\n3McGB8essxNWBt8pEpwJTi8ZY+W71b7j7KWz2lmCoxlxY2d0VxqsuVqXzgh5\n+eaZ2fUFLS20GLDQI3HkCxJ6n+vBzjgNVAyugDUTZ/vDJ/oYMqSs1b3yO9mU\nO5N11oPQm2Oz+P+RSbatLDiZQ6K0hkm7564mjZ1kIXZ1cWbM/mjPKl1FnO3f\n8lxR1Ww/praM91D6fdA2rZ2KvjRl2woi+wGBg1BjtOvILGY+iEUGlQ248QuW\nTTMcJcBaGZo+eA19AzfRQ9kje3L75f6+t99Xb+mXd9nRQkg0NbeAexAjkxBG\nTPIAvjqgJ50T9YynYggrk40A6co9qzrwYP9mvHOujFaqEMqGUwarR2+hrTzr\nvLLyaspokng11d1Vj8VrjqXsTQ21fP0u9x/HV/+CfCmNUsD/Qbcb/nJGGzeA\nBZlR01UCkx5Anbfg0xGIuVvcgGbB0yKCk/CkA+g9y5LOS8wgRI8sluHV7rXW\n76i+dRbMcchDOwmoylOl40F27xCasYhTMlLmZVBWnB31FQA58UI0iQgn7D/b\nVfdN\r\n=AuBy\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-uGUwcZ8gRMneArsSNh5PCLNe3VXSgh7aQAVpGztKcyDoEZ7/JW0SBD9CPlwN7BZP/Vq3pFf0VNSecDqWQmKwWQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCbRoY/ddm8015y/7qFTLKeENZPqrqlDwbLGbr5PXJRrgIhAKmvTaHEF1gterh9kE/JjrvDgA0kcTeISHyk2LjY31yO"}],"size":3068,"noattachment":false,"key":"/postcss-markdown/-/postcss-markdown-0.26.0.tgz"},"maintainers":[{"email":"andrey@sitnik.ru","name":"ai"},{"email":"gucong@gmail.com","name":"gucong"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postcss-markdown_0.26.0_1527485644007_0.2765123628466448"},"_hasShrinkwrap":false,"readme":"# PostCSS Markdown Syntax\n\n[![NPM license](https://img.shields.io/npm/l/postcss-markdown.svg)](https://www.npmjs.com/package/postcss-markdown)\n[![NPM version](https://img.shields.io/npm/v/postcss-markdown.svg?style=flat-square)](https://www.npmjs.com/package/postcss-markdown)\n[![NPM downloads](https://img.shields.io/npm/dw/postcss-markdown.svg)](http://www.npmtrends.com/postcss-markdown)\n[![NPM downloads](https://img.shields.io/npm/dm/postcss-markdown.svg)](http://www.npmtrends.com/postcss-markdown)\n[![NPM downloads](https://img.shields.io/npm/dy/postcss-markdown.svg)](http://www.npmtrends.com/postcss-markdown)\n[![Build Status](https://github.com/ota-meshi/postcss-markdown/workflows/CI/badge.svg?branch=master)](https://github.com/ota-meshi/postcss-markdown/actions?query=workflow%3ACI)\n\n<img align=\"right\" width=\"95\" height=\"95\"\n title=\"Philosopher’s stone, logo of PostCSS\"\n src=\"http://postcss.github.io/postcss/logo.svg\">\n\n[PostCSS](https://github.com/postcss/postcss) syntax for parsing [Markdown](https://daringfireball.net/projects/markdown/syntax)\n\n## Getting Started\n\nFirst thing's first, install the module:\n\n```bash\nnpm install postcss-markdown --save-dev\n```\n\nIf you want support SCSS/SASS/LESS/SugarSS syntax, you need to install the corresponding module.\n\n- SCSS: [postcss-scss](https://github.com/postcss/postcss-scss)\n- SASS: [postcss-sass](https://github.com/aleshaoleg/postcss-sass)\n- LESS: [postcss-less](https://github.com/shellscape/postcss-less)\n- SugarSS: [sugarss](https://github.com/postcss/sugarss)\n- Stylus: [postcss-styl](https://github.com/ota-meshi/postcss-styl)\n\n## Use Cases\n\n```js\nconst postcss = require(\"postcss\");\nconst syntax = require(\"postcss-markdown\")({\n    // Enable support for HTML (default: true)\n    htmlInMd: true,\n    // syntax for parse scss (non-required options)\n    scss: require(\"postcss-scss\"),\n    // syntax for parse less (non-required options)\n    less: require(\"postcss-less\"),\n    // syntax for parse css blocks (non-required options)\n    css: require(\"postcss-safe-parser\"),\n});\nconst autoprefixer = require(\"autoprefixer\");\npostcss([autoprefixer])\n    .process(source, { syntax: syntax })\n    .then(function (result) {\n        // An alias for the result.css property. Use it with syntaxes that generate non-CSS output.\n        result.content;\n    });\n```\n\ninput:\n\n<pre><code># title\n\n```css\n::placeholder {\n    color: gray;\n}\n```\n</code></pre>\n\noutput:\n\n<pre><code># title\n\n```css\n::-moz-placeholder {\n    color: gray;\n}\n:-ms-input-placeholder {\n    color: gray;\n}\n::placeholder {\n    color: gray;\n}\n```\n</code></pre>\n\nIf you want support SCSS/SASS/LESS/SugarSS syntax, you need to install these module:\n\n- SCSS: [postcss-scss](https://github.com/postcss/postcss-scss)\n- SASS: [postcss-sass](https://github.com/aleshaoleg/postcss-sass)\n- LESS: [postcss-less](https://github.com/shellscape/postcss-less)\n- SugarSS: [sugarss](https://github.com/postcss/sugarss)\n- Stylus: [postcss-styl](https://github.com/ota-meshi/postcss-styl)\n\n## Advanced Use Cases\n\n### Options\n\n```js\nconst options = {\n    rules: [\n        {\n            // custom language\n            test: /^postcss$/i,\n            lang: \"scss\",\n        },\n        {\n            // custom language\n            test: /^customcss$/i,\n            lang: \"custom\",\n        },\n    ],\n\n    // custom parser for CSS (using `postcss-safe-parser`)\n    css: \"postcss-safe-parser\",\n    // custom parser for SASS (PostCSS-compatible syntax.)\n    sass: require(\"postcss-sass\"),\n    // custom parser for SCSS (by module name)\n    scss: \"postcss-scss\",\n    // custom parser for LESS (by module path)\n    less: require.resolve(\"./node_modules/postcss-less\"),\n    // custom parser for SugarSS\n    sugarss: require(\"sugarss\"),\n    // custom parser for custom language\n    custom: require(\"postcss-custom-syntax\"),\n};\nconst syntax = require(\"postcss-markdown\")(options);\n```\n\n## Turning PostCSS off from within your Markdown\n\nPostCSS can be temporarily turned off by using special comments in your Markdown. For example:\n\n<pre><code>&lt;!-- postcss-ignore -->\n```css\na {\n    color: red;\n}\n```\n</code></pre>\n\n## Linting with Stylelint\n\nThe main use case of this plugin is to apply linting with [Stylelint] to CSS (and CSS-like) code blocks in markdown file.\n\nYou can use it by configuring your `stylelint` config as follows:\n\n```json\n{\n    \"overrides\": [\n        {\n            \"files\": [\"*.md\", \"**/*.md\"],\n            \"customSyntax\": \"postcss-markdown\"\n        }\n    ]\n}\n```\n\n[stylelint]: https://stylelint.io/\n\n### Editor integrations\n\n#### Visual Studio Code\n\nUse the [stylelint.vscode-stylelint](https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint) extension that [Stylelint] provides officially.\n\nYou have to configure the `stylelint.validate` option of the extension to check `.md` files, because the extension does not check the `*.md` file by default.\n\nExample **.vscode/settings.json**:\n\n```jsonc\n{\n  \"stylelint.validate\": [\n      ...,\n      // ↓ Add \"markdown\" language.\n      \"markdown\"\n  ]\n```\n\n","publish_time":1527485644100,"_cnpm_publish_time":1527485644100,"dist-tags":{"latest":"2.0.0","next":"1.0.0-beta.2"}}