Skip to content

Commit

Permalink
Merge branch 'next' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
kellyjosephprice committed Jun 15, 2021
2 parents dc06e20 + 24142c0 commit 6feecea
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Changelog
===

## Version 6.27.2-next.1

### ✨ New & Improved

* **tables:** hide empty table header rows ([#99](https://github.com/readmeio/markdown/issues/99)) ([8b6d24b](https://github.com/readmeio/markdown/commit/8b6d24bf3b1cebfce19b161bb669e504bddf083d))

## Version 6.27.1

### 🛠 Fixes & Updates
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion components/HTMLBlock.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ const PropTypes = require('prop-types');
const MATCH_SCRIPT_TAGS = /<script\b[^>]*>([\s\S]*?)<\/script>\n?/gim;

const extractScripts = (html = '') => {
const scripts = [...html.matchAll(MATCH_SCRIPT_TAGS)].map(m => m[1]);
const scripts = [];
let match;
while ((match = MATCH_SCRIPT_TAGS.exec(html)) !== null) {
scripts.push(match[1]);
}
const cleaned = html.replace(MATCH_SCRIPT_TAGS, '');
return [cleaned, () => scripts.map(js => window.eval(js))];
};
Expand Down
10 changes: 8 additions & 2 deletions components/Table/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,18 @@

tr {
background-color: var(--table-row, #{$row});
border-top: 1px solid var(--table-edges, #{$edges});
& + tr {
border-top: 1px solid var(--table-edges, #{$edges});
}
}

th,
thead td {
font-weight: 600;
&:empty {
padding: 0;
border: none;
}
}

td,
Expand All @@ -39,7 +45,7 @@
> :first-child, > :only-child { margin-top: 0 !important }
> :last-child, > :only-child { margin-bottom: 0 !important }
}

&:not(.plain) tr:nth-child(2n) {
background-color: var(--table-stripe, #{$stripe});
}
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@readme/markdown",
"description": "ReadMe's React-based Markdown parser",
"author": "Rafe Goldberg <[email protected]>",
"version": "6.27.1",
"version": "6.27.2-next.1",
"main": "dist/main.node.js",
"browser": "dist/main.js",
"files": [
Expand Down

0 comments on commit 6feecea

Please sign in to comment.