Gathering detailed insights and metrics for @mapbox/hast-util-table-cell-style
Gathering detailed insights and metrics for @mapbox/hast-util-table-cell-style
Gathering detailed insights and metrics for @mapbox/hast-util-table-cell-style
Gathering detailed insights and metrics for @mapbox/hast-util-table-cell-style
Transform deprecated styling attributes on HAST table cells to inline styles.
npm install @mapbox/hast-util-table-cell-style
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
2 Stars
33 Commits
9 Forks
92 Watching
2 Branches
537 Contributors
Updated on 12 Apr 2024
Minified
Minified + Gzipped
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-6.3%
17,531
Compared to previous day
Last week
3.4%
105,905
Compared to previous week
Last month
-10.8%
481,324
Compared to previous month
Last year
20.4%
7,790,116
Compared to previous year
1
Transform deprecated styling attributes on HAST table cells to inline styles.
HAST is the abstract syntax (AST) tree representing HTML that rehype uses.
If you use remark to process Markdown as GitHub Flavored Markdown, you may find that your table cell elements end up with align
attributes.
However, align
on these elements was deprecated in HTML5: the suggestion is to use a style
attribute that sets text-align
, instead.
This matters because more recent syntaxes might altogether ignore align
or other deprecated styling attributes.
React, for example, does not support align
attributes; so if you try to transform Markdown to React elements, you'll lose your align
values.
(remark-react had to confront this issue.)
This simple utility transforms the following deprecated styling attributes on <td>
, <th>
, and <tr>
elements to equivalent inline styles:
align
valign
width
height
npm install @mapbox/hast-util-table-cell-style
1const tableCellStyle = require('@mapbox/hast-util-table-cell-style'); 2 3// Use rehype to get an AST. 4const transformed = tableCellStyle(ast);
Mutates the HAST AST you pass in, and returns it.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
security policy file detected
Details
Reason
license file detected
Details
Reason
4 existing vulnerabilities detected
Details
Reason
Found 2/17 approved changesets -- score normalized to 1
Reason
SAST tool is not run on all commits -- score normalized to 1
Details
Reason
project is archived
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More