{"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":{"integrity":"sha512-gqaTIGC8My3LVSnU38IwjHVKJC94HSonjvFHDk8/aSrApL8v4uWgm8zJkK7MJIIbHuNOr/+Mv2KkQKcxs6LEZA==","shasum":"1003f59d54fae6f638cb5646f52110fb3da95b4d","tarball":"http://registry-npm.ywwl.com/@mapbox/hast-util-table-cell-style/download/@mapbox/hast-util-table-cell-style-0.2.0.tgz","fileCount":10,"unpackedSize":14106,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglUaQCRA9TVsSAnZWagAA0N0P/idFB8OBX7ZzqmH6+JXS\n+zKwuxrNWtgqzqEvRyl4bgQ30isKEKWSfaUNt/jtNd4Pg7Ve3mOKwdWGy7Ef\nAgGhtJsq1+I71crmmVRjayQxxOPih8ZpM54JXJAKaA816g8L/IQ4xiVUvP3Y\ny3Z+85raevuK+Mrv8IsBswnWdDTRYHCie5rKFodRVSKN7pnAK0+wp04KhiLt\nbdncuXDroZOBJj67hF+cZLcJVqB0HllFHHGNd5hf3wGb4hhLzH+b7P9Qpms6\nRB4zSJPS/0NA01h9exKd0boTmshr6U9ZJM7Pou98QdwERfs7Tu5HrYq2F4+y\nbErbtfNtkZttPJ62iGb0Xci798SNjCQpqUR3V88QUyEbvcaiAWJiwg5So9+I\nMoLfZciPdI7pRMA5R6Jj/Z6sFWuUBAxoGnomRyrHrHeEIUqb1nYr4N9Xyx5C\n1T2S3aZggxPpIYK6NQC65wUGxtDv4ZynnIMguFz9a026M0rxUSZi6JuRlEA1\ndOCeAisZQHUFz/33xFH8IepinbYvC9Ni22lnI0WpBgLIKxhpE/YecVRbYdVN\n3hNgRuoy0PlXjs1qSPgFqFiCW92uI0M+NiWG9x9ovRroL8+y0H5BS2Yg1rba\njk3HORbReHlabTSeMJfrAdYfRdMX7j6cLZvPnhIwGEzWHZfgjq464rpBpQJw\nxcR0\r\n=e0uL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCyz8E+m17Xek/YIQ8I8SnflVebBg1fL3QbmGK8+FTtoQIgN2mOxtHgtnlWHOmPFXrohnWdiT9R01U8IoycNzOKUd4="}],"size":4736,"noattachment":false,"key":"/@mapbox/hast-util-table-cell-style/-/@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-npm-01","email":"accounts+npmjs-01@mapbox.com"},{"name":"mapbox-npm-02","email":"accounts+npmjs-02@mapbox.com"},{"name":"mapbox-npm-07","email":"accounts+npmjs-07@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-09","email":"accounts+npmjs-09@mapbox.com"},{"name":"mapbox-npm-05","email":"accounts+npmjs-05@mapbox.com"},{"name":"mapbox-npm-06","email":"accounts+npmjs-06@mapbox.com"},{"name":"mapbox-npm-08","email":"accounts+npmjs-08@mapbox.com"},{"name":"mapbox-npm-advanced-actions","email":"accounts+npmjs-advanced-actions@mapbox.com"},{"name":"mapbox-npm-ci","email":"accounts+npmjs-npm-ci@mapbox.com"},{"name":"mapbox-npm","email":"accounts+npmjs@mapbox.com"},{"name":"mapbox-admin","email":"accounts@mapbox.com"},{"name":"mapbox-machine-user","email":"accounts+npm-mapbox-machine-user@mapbox.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hast-util-table-cell-style_0.2.0_1620395664508_0.16341709613501787"},"_hasShrinkwrap":false,"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","publish_time":1620395664670,"_cnpm_publish_time":1620395664670,"dist-tags":{"latest":"0.2.1"}}