Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e3bd4df

Browse filesBrowse files
committed
gen-readme: fix no NL before screenshots w/o demo
1 parent 6b6fa8b commit e3bd4df
Copy full SHA for e3bd4df

File tree

Expand file treeCollapse file tree

2 files changed

+17
-9
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+17
-9
lines changed

‎README.md

Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,7 @@ These are frameworks that do not force you to apply their classes to many elemen
410410
A class-light variant of a CSS framework with classes. Made for Ruby on Rails.
411411

412412
* [Repository](https://github.com/lazaronixon/sass-zero) ![GitHub stars](https://img.shields.io/github/stars/lazaronixon/sass-zero?style=flat-square) ![GitHub contributors](https://img.shields.io/github/contributors-anon/lazaronixon/sass-zero?style=flat-square) ![Last commit](https://img.shields.io/github/last-commit/lazaronixon/sass-zero?style=flat-square) ![GitHub open issues](https://img.shields.io/github/issues-raw/lazaronixon/sass-zero?style=flat-square) ![GitHub closed issues](https://img.shields.io/github/issues-closed-raw/lazaronixon/sass-zero?style=flat-square)
413+
413414
[![sass-zero.png](thumbnail/sass-zero.png)](screenshot/sass-zero.png)
414415

415416

‎gen-readme.ts

Copy file name to clipboardExpand all lines: gen-readme.ts
+16-9Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,25 @@ const renderItem = (
3939
`[![${filename}](thumbnail/${filename})](screenshot/${filename})`
4040
).join("\n");
4141

42-
return `### ${name}\n\n` +
43-
(note === "" ? "" : `${note}\n\n`) +
44-
(website === "" ? "" : `* [Website](${website})\n`) +
45-
(github === ""
46-
? ""
47-
: `* [Repository](https://github.com/${github}) ![GitHub stars](https://img.shields.io/github/stars/${github}?style=flat-square) ` +
42+
const lines: string[] = [];
43+
lines.push(`### ${name}`, "");
44+
if (note !== "") {
45+
lines.push(note, "");
46+
}
47+
if (website !== "") lines.push(`* [Website](${website})`);
48+
if (github !== "") {
49+
lines.push(
50+
`* [Repository](https://github.com/${github}) ![GitHub stars](https://img.shields.io/github/stars/${github}?style=flat-square) ` +
4851
`![GitHub contributors](https://img.shields.io/github/contributors-anon/${github}?style=flat-square) ` +
4952
`![Last commit](https://img.shields.io/github/last-commit/${github}?style=flat-square) ` +
5053
`![GitHub open issues](https://img.shields.io/github/issues-raw/${github}?style=flat-square) ` +
51-
`![GitHub closed issues](https://img.shields.io/github/issues-closed-raw/${github}?style=flat-square)\n`) +
52-
(demo === "" ? "" : `* [Demo](${demo})\n\n`) +
53-
screenshotMarkdown;
54+
`![GitHub closed issues](https://img.shields.io/github/issues-closed-raw/${github}?style=flat-square)`,
55+
);
56+
}
57+
if (demo !== "") lines.push(`* [Demo](${demo})`);
58+
lines.push("", screenshotMarkdown);
59+
60+
return lines.join("\n");
5461
};
5562

5663
try {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.