{"_id":"@mapbox/hast-util-table-cell-style","_rev":"395297","name":"@mapbox/hast-util-table-cell-style","description":"Transform deprecated styling attributes on HAST table cells to inline styles","dist-tags":{"latest":"0.2.0"},"maintainers":[{"name":"mapbox-machine-user","email":"accounts+npm-mapbox-machine-user@mapbox.com"},{"name":"mapbox-npm","email":"accounts+npmjs@mapbox.com"},{"name":"mapbox-npm-01","email":"accounts+npmjs-01@mapbox.com"},{"name":"mapbox-npm-02","email":"accounts+npmjs-02@mapbox.com"},{"name":"mapbox-npm-03","email":"accounts+npmjs-03@mapbox.com"},{"name":"mapbox-npm-04","email":"accounts+npmjs-04@mapbox.com"},{"name":"mapbox-npm-08","email":"accounts+npmjs-08@mapbox.com"},{"name":"mapbox-npm-09","email":"accounts+npmjs-09@mapbox.com"},{"name":"mapbox-npm-ci","email":"accounts+npmjs-npm-ci@mapbox.com"}],"time":{"modified":"2021-08-04T04:09:33.000Z","created":"2018-04-01T19:17:07.778Z","0.2.0":"2021-05-07T13:54:24.670Z","0.1.3":"2018-04-26T18:19:53.299Z","0.1.2":"2018-04-02T15:53:31.635Z","0.1.1":"2018-04-01T19:33:45.914Z","0.1.0":"2018-04-01T19:17:07.778Z"},"users":{},"author":{"name":"Mapbox"},"repository":{"type":"git","url":"git+https://github.com/mapbox/hast-util-table-cell-style.git"},"versions":{"0.2.0":{"name":"@mapbox/hast-util-table-cell-style","version":"0.2.0","description":"Transform deprecated styling attributes on HAST table cells to inline styles","main":"index.js","scripts":{"lint":"eslint .","pretest":"npm run lint","test":"jest","format":"prettier --write '**/*.js'"},"repository":{"type":"git","url":"git+https://github.com/mapbox/hast-util-table-cell-style.git"},"keywords":["hast","rehype","unified","remark","ast","utility","table"],"author":{"name":"Mapbox"},"license":"BSD-2-Clause","bugs":{"url":"https://github.com/mapbox/hast-util-table-cell-style/issues"},"homepage":"https://github.com/mapbox/hast-util-table-cell-style#readme","engines":{"node":">=12"},"dependencies":{"unist-util-visit":"^1.4.1"},"devDependencies":{"eslint":"^7.25.0","eslint-plugin-node":"^11.1.0","husky":"^4.3.8","jest":"^26.6.3","lint-staged":"^10.5.4","prettier":"^2.2.1","rehype-parse":"^4.1.0","rehype-stringify":"^3.0.0","unified":"^6.2.0"},"jest":{"testEnvironment":"node"},"prettier":{"singleQuote":true},"lint-staged":{"*.js":["eslint","prettier --write","git add"]},"husky":{"hooks":{"pre-commit":"lint-staged"}},"gitHead":"310b5c1daebf7b2851e77c339beea1a16f4c5c8a","_id":"@mapbox/hast-util-table-cell-style@0.2.0","_nodeVersion":"12.18.3","_npmVersion":"6.14.11","dist":{"shasum":"1003f59d54fae6f638cb5646f52110fb3da95b4d","size":4736,"noattachment":false,"key":"/@mapbox/hast-util-table-cell-style/-/@mapbox/hast-util-table-cell-style-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@mapbox/hast-util-table-cell-style/download/@mapbox/hast-util-table-cell-style-0.2.0.tgz"},"_npmUser":{"name":"mapbox-npm-03","email":"accounts+npmjs-03@mapbox.com"},"directories":{},"maintainers":[{"name":"mapbox-machine-user","email":"accounts+npm-mapbox-machine-user@mapbox.com"},{"name":"mapbox-npm","email":"accounts+npmjs@mapbox.com"},{"name":"mapbox-npm-01","email":"accounts+npmjs-01@mapbox.com"},{"name":"mapbox-npm-02","email":"accounts+npmjs-02@mapbox.com"},{"name":"mapbox-npm-03","email":"accounts+npmjs-03@mapbox.com"},{"name":"mapbox-npm-04","email":"accounts+npmjs-04@mapbox.com"},{"name":"mapbox-npm-08","email":"accounts+npmjs-08@mapbox.com"},{"name":"mapbox-npm-09","email":"accounts+npmjs-09@mapbox.com"},{"name":"mapbox-npm-ci","email":"accounts+npmjs-npm-ci@mapbox.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hast-util-table-cell-style_0.2.0_1620395664508_0.16341709613501787"},"_hasShrinkwrap":false,"publish_time":1620395664670,"_cnpm_publish_time":1620395664670},"0.1.3":{"name":"@mapbox/hast-util-table-cell-style","version":"0.1.3","description":"Transform deprecated styling attributes on HAST table cells to inline styles","main":"index.js","scripts":{"lint":"eslint .","pretest":"npm run lint","test":"jest","format":"prettier --write '**/*.js'","precommit":"lint-staged"},"repository":{"type":"git","url":"git+https://github.com/mapbox/hast-util-table-cell-style.git"},"keywords":["hast","rehype","unified","remark","ast","utility","table"],"author":{"name":"Mapbox"},"license":"BSD-2-Clause","bugs":{"url":"https://github.com/mapbox/hast-util-table-cell-style/issues"},"homepage":"https://github.com/mapbox/hast-util-table-cell-style#readme","engines":{"node":">=4"},"dependencies":{"unist-util-visit":"^1.3.0"},"devDependencies":{"eslint":"^4.19.1","eslint-plugin-node":"^6.0.1","husky":"^0.14.3","jest":"^22.4.3","lint-staged":"^7.0.2","prettier":"^1.11.1","rehype-parse":"^4.1.0","rehype-stringify":"^3.0.0","unified":"^6.1.6"},"jest":{"testEnvironment":"node"},"prettier":{"singleQuote":true},"lint-staged":{"*.js":["eslint","prettier --write","git add"]},"gitHead":"33315d618c0c5d64ccab7391017027aba81bcfab","_id":"@mapbox/hast-util-table-cell-style@0.1.3","_npmVersion":"6.0.0","_nodeVersion":"8.11.1","_npmUser":{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},"dist":{"shasum":"5b7166ae01297d72216932b245e4b2f0b642dca6","size":4643,"noattachment":false,"key":"/@mapbox/hast-util-table-cell-style/-/@mapbox/hast-util-table-cell-style-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/@mapbox/hast-util-table-cell-style/download/@mapbox/hast-util-table-cell-style-0.1.3.tgz"},"maintainers":[{"name":"mapbox-machine-user","email":"accounts+npm-mapbox-machine-user@mapbox.com"},{"name":"mapbox-npm","email":"accounts+npmjs@mapbox.com"},{"name":"mapbox-npm-01","email":"accounts+npmjs-01@mapbox.com"},{"name":"mapbox-npm-02","email":"accounts+npmjs-02@mapbox.com"},{"name":"mapbox-npm-03","email":"accounts+npmjs-03@mapbox.com"},{"name":"mapbox-npm-04","email":"accounts+npmjs-04@mapbox.com"},{"name":"mapbox-npm-08","email":"accounts+npmjs-08@mapbox.com"},{"name":"mapbox-npm-09","email":"accounts+npmjs-09@mapbox.com"},{"name":"mapbox-npm-ci","email":"accounts+npmjs-npm-ci@mapbox.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hast-util-table-cell-style_0.1.3_1524766793213_0.10122252373368545"},"_hasShrinkwrap":false,"publish_time":1524766793299,"_cnpm_publish_time":1524766793299},"0.1.2":{"name":"@mapbox/hast-util-table-cell-style","version":"0.1.2","description":"Transform deprecated styling attributes on HAST table cells to inline styles","main":"index.js","scripts":{"lint":"eslint .","pretest":"npm run lint","test":"jest","format":"prettier --write '**/*.js'","precommit":"lint-staged"},"repository":{"type":"git","url":"git+https://github.com/mapbox/hast-util-table-cell-style.git"},"keywords":["hast","rehype","unified","remark","ast","utility","table"],"author":{"name":"Mapbox"},"license":"BSD-2-Clause","bugs":{"url":"https://github.com/mapbox/hast-util-table-cell-style/issues"},"homepage":"https://github.com/mapbox/hast-util-table-cell-style#readme","engines":{"node":">=4"},"dependencies":{"unist-util-visit":"^1.3.0"},"devDependencies":{"eslint":"^4.19.1","eslint-plugin-node":"^6.0.1","husky":"^0.14.3","jest":"^22.4.3","lint-staged":"^7.0.2","prettier":"^1.11.1","rehype-parse":"^4.1.0","rehype-stringify":"^3.0.0","unified":"^6.1.6"},"jest":{"testEnvironment":"node"},"prettier":{"singleQuote":true},"lint-staged":{"*.js":["eslint","prettier --write","git add"]},"gitHead":"614d5c77ffd3c9d1006f5e30417da7917f2b7343","_id":"@mapbox/hast-util-table-cell-style@0.1.2","_npmVersion":"5.8.0","_nodeVersion":"8.9.4","_npmUser":{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},"dist":{"shasum":"90bf5f73f31efb87b0ae61a54c0bb18c7855ab80","size":4569,"noattachment":false,"key":"/@mapbox/hast-util-table-cell-style/-/@mapbox/hast-util-table-cell-style-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/@mapbox/hast-util-table-cell-style/download/@mapbox/hast-util-table-cell-style-0.1.2.tgz"},"maintainers":[{"name":"mapbox-machine-user","email":"accounts+npm-mapbox-machine-user@mapbox.com"},{"name":"mapbox-npm","email":"accounts+npmjs@mapbox.com"},{"name":"mapbox-npm-01","email":"accounts+npmjs-01@mapbox.com"},{"name":"mapbox-npm-02","email":"accounts+npmjs-02@mapbox.com"},{"name":"mapbox-npm-03","email":"accounts+npmjs-03@mapbox.com"},{"name":"mapbox-npm-04","email":"accounts+npmjs-04@mapbox.com"},{"name":"mapbox-npm-08","email":"accounts+npmjs-08@mapbox.com"},{"name":"mapbox-npm-09","email":"accounts+npmjs-09@mapbox.com"},{"name":"mapbox-npm-ci","email":"accounts+npmjs-npm-ci@mapbox.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hast-util-table-cell-style_0.1.2_1522684411445_0.11172948454475096"},"_hasShrinkwrap":false,"publish_time":1522684411635,"_cnpm_publish_time":1522684411635},"0.1.1":{"name":"@mapbox/hast-util-table-cell-style","version":"0.1.1","description":"Transform deprecated styling attributes on HAST table cells to inline styles","main":"index.js","scripts":{"lint":"eslint .","pretest":"npm run lint","test":"jest","format":"prettier --write '**/*.js'","precommit":"lint-staged"},"repository":{"type":"git","url":"git+https://github.com/mapbox/hast-util-table-cell-style.git"},"keywords":["hast","rehype","unified","remark","ast","utility","table"],"author":{"name":"Mapbox"},"license":"BSD-2-Clause","bugs":{"url":"https://github.com/mapbox/hast-util-table-cell-style/issues"},"homepage":"https://github.com/mapbox/hast-util-table-cell-style#readme","engines":{"node":">=6"},"dependencies":{"unist-util-visit":"^1.3.0"},"devDependencies":{"eslint":"^4.19.1","eslint-plugin-node":"^6.0.1","husky":"^0.14.3","jest":"^22.4.3","lint-staged":"^7.0.2","prettier":"^1.11.1","rehype-parse":"^4.1.0","rehype-stringify":"^3.0.0","unified":"^6.1.6"},"jest":{"testEnvironment":"node"},"prettier":{"singleQuote":true},"lint-staged":{"*.js":["eslint","prettier --write","git add"]},"gitHead":"bde7aa110bd39c2d776b6edc882a0d7b86d5fa11","_id":"@mapbox/hast-util-table-cell-style@0.1.1","_npmVersion":"5.8.0","_nodeVersion":"8.9.4","_npmUser":{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},"dist":{"shasum":"df8139f31eb0e59c7c2860f076bd0c546f6ddf9d","size":4546,"noattachment":false,"key":"/@mapbox/hast-util-table-cell-style/-/@mapbox/hast-util-table-cell-style-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@mapbox/hast-util-table-cell-style/download/@mapbox/hast-util-table-cell-style-0.1.1.tgz"},"maintainers":[{"name":"mapbox-machine-user","email":"accounts+npm-mapbox-machine-user@mapbox.com"},{"name":"mapbox-npm","email":"accounts+npmjs@mapbox.com"},{"name":"mapbox-npm-01","email":"accounts+npmjs-01@mapbox.com"},{"name":"mapbox-npm-02","email":"accounts+npmjs-02@mapbox.com"},{"name":"mapbox-npm-03","email":"accounts+npmjs-03@mapbox.com"},{"name":"mapbox-npm-04","email":"accounts+npmjs-04@mapbox.com"},{"name":"mapbox-npm-08","email":"accounts+npmjs-08@mapbox.com"},{"name":"mapbox-npm-09","email":"accounts+npmjs-09@mapbox.com"},{"name":"mapbox-npm-ci","email":"accounts+npmjs-npm-ci@mapbox.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hast-util-table-cell-style_0.1.1_1522611225817_0.4669507124718668"},"_hasShrinkwrap":false,"publish_time":1522611225914,"_cnpm_publish_time":1522611225914},"0.1.0":{"name":"@mapbox/hast-util-table-cell-style","version":"0.1.0","description":"Transform deprecated styling attributes on HAST table cells to inline styles","main":"index.js","scripts":{"lint":"eslint .","pretest":"npm run lint","test":"jest","format":"prettier --write '**/*.js'","precommit":"lint-staged"},"repository":{"type":"git","url":"git+https://github.com/mapbox/hast-util-table-cell-style.git"},"keywords":["hast","rehype","unified","remark","ast","utility","table"],"author":{"name":"Mapbox"},"license":"BSD-2-Clause","bugs":{"url":"https://github.com/mapbox/hast-util-table-cell-style/issues"},"homepage":"https://github.com/mapbox/hast-util-table-cell-style#readme","engines":{"node":">=6"},"devDependencies":{"eslint":"^4.19.1","eslint-plugin-node":"^6.0.1","husky":"^0.14.3","jest":"^22.4.3","lint-staged":"^7.0.2","prettier":"^1.11.1","rehype-parse":"^4.1.0","rehype-stringify":"^3.0.0","unified":"^6.1.6","unist-util-visit":"^1.3.0"},"jest":{"testEnvironment":"node"},"prettier":{"singleQuote":true},"lint-staged":{"*.js":["eslint","prettier --write","git add"]},"gitHead":"1e6eb273bdce02a3df4fe0b8bdb275490d6f12d5","_id":"@mapbox/hast-util-table-cell-style@0.1.0","_npmVersion":"5.8.0","_nodeVersion":"8.9.4","_npmUser":{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},"dist":{"shasum":"ac4da9ba59f34dbf6ec076fa1bc66e86d5a486ac","size":4528,"noattachment":false,"key":"/@mapbox/hast-util-table-cell-style/-/@mapbox/hast-util-table-cell-style-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@mapbox/hast-util-table-cell-style/download/@mapbox/hast-util-table-cell-style-0.1.0.tgz"},"maintainers":[{"name":"mapbox-machine-user","email":"accounts+npm-mapbox-machine-user@mapbox.com"},{"name":"mapbox-npm","email":"accounts+npmjs@mapbox.com"},{"name":"mapbox-npm-01","email":"accounts+npmjs-01@mapbox.com"},{"name":"mapbox-npm-02","email":"accounts+npmjs-02@mapbox.com"},{"name":"mapbox-npm-03","email":"accounts+npmjs-03@mapbox.com"},{"name":"mapbox-npm-04","email":"accounts+npmjs-04@mapbox.com"},{"name":"mapbox-npm-08","email":"accounts+npmjs-08@mapbox.com"},{"name":"mapbox-npm-09","email":"accounts+npmjs-09@mapbox.com"},{"name":"mapbox-npm-ci","email":"accounts+npmjs-npm-ci@mapbox.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hast-util-table-cell-style_0.1.0_1522610227730_0.3552302321069132"},"_hasShrinkwrap":false,"publish_time":1522610227778,"_cnpm_publish_time":1522610227778}},"readme":"# @mapbox/hast-util-table-cell-style\n\n[![Build Status](https://travis-ci.com/mapbox/hast-util-table-cell-style.svg?branch=main)](https://travis-ci.com/mapbox/hast-util-table-cell-style)\n\nTransform deprecated styling attributes on [HAST] table cells to inline styles.\n\n## About\n\n[HAST] is the abstract syntax (AST) tree representing HTML that [rehype] uses.\n\nIf you use [remark] to process Markdown as [GitHub Flavored Markdown], you may find that your table cell elements end up with `align` attributes.\nHowever, `align` on these elements was deprecated in HTML5: [the suggestion](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td) is to use a `style` attribute that sets `text-align`, instead.\n\nThis matters because more recent syntaxes might altogether ignore `align` or other deprecated styling attributes.\nReact, for example, [does not support `align` attributes](https://reactjs.org/docs/dom-elements.html#all-supported-html-attributes); so if you try to transform Markdown to React elements, you'll lose your `align` values.\n([remark-react] had to [confront this issue](https://github.com/mapbox/remark-react/issues/28).)\n\nThis simple utility transforms the following deprecated styling attributes on `<td>`, `<th>`, and `<tr>` elements to equivalent inline styles:\n\n- `align`\n- `valign`\n- `width`\n- `height`\n\n## Installation\n\n```\nnpm install @mapbox/hast-util-table-cell-style\n```\n\n## Usage\n\n```js\nconst tableCellStyle = require('@mapbox/hast-util-table-cell-style');\n\n// Use rehype to get an AST.\nconst transformed = tableCellStyle(ast);\n```\n\nMutates the [HAST] AST you pass in, and returns it.\n\n[HAST]: https://github.com/syntax-tree/hast\n[rehype]: https://github.com/rehypejs/rehype\n[remark]: https://github.com/remarkjs/remark\n[GitHub Flavored Markdown]: https://help.github.com/articles/getting-started-with-writing-and-formatting-on-github/\n[remark-react]: https://github.com/mapbox/remark-react","_attachments":{},"homepage":"https://github.com/mapbox/hast-util-table-cell-style#readme","bugs":{"url":"https://github.com/mapbox/hast-util-table-cell-style/issues"},"license":"BSD-2-Clause"}