Skip to content

Commit bfd27a9

Browse files
authored
fix(github): improve formatting of issue template spoilers (#311)
- I originally made the spoilers and while they work (and I would say improve readability a good bit), there's also some issues with them - I've used them a ton more now so know how to workaround most of the issues with them now - fix: use HTML `code` tag inside of `summary` tag, can't use backticks - was mixing MD and HTML before, and this doesn't always work and didn't work on GitHub, they just had backticks - fix: don't duplicate the file name in the heading, just make the `summary` have a heading inside it instead - use an `h4` same as the `####` that it was before - feat: add syntax highlighting by adding code blocks for each code snippet - js for rollup.config.js, json5 for tsconfig (it has comments, trailing commas, etc (actually a custom parser, but json5 is close enough)), json for package.json, and text for verbose logs - also, a lot of people sometimes just paste the code with no code block and it formats terribly, so this should help defer that (as well as any potential issues that can crop up with unindented blocks) - the `envinfo` text code block seems to be working well, so hopefully this will improve issues too
1 parent ff88951 commit bfd27a9

File tree

1 file changed

+24
-16
lines changed

1 file changed

+24
-16
lines changed

Diff for: .github/issue_template.md

+24-16
Original file line numberDiff line numberDiff line change
@@ -18,42 +18,50 @@
1818
1919
```
2020

21-
#### rollup.config.js
22-
2321
<!--- paste your rollup config below if relevant --->
2422
<details>
25-
<summary>`rollup.config.js`: </summary>
23+
<summary><h4><code>rollup.config.js</code></h4>: </summary>
2624

27-
<!--- INSERT rollup.config.js HERE --->
25+
<!--- INSERT rollup.config.ts IN THE CODE SNIPPET BELOW --->
2826

29-
</details>
27+
```js
3028

31-
#### tsconfig.json
29+
```
30+
31+
</details>
3232

3333
<!--- paste your tsconfig.json below if relevant --->
3434
<details>
35-
<summary>`tsconfig.json`: </summary>
35+
<summary><h4><code>tsconfig.json</code></h4>: </summary>
3636

37-
<!--- INSERT tsconfig.json HERE --->
37+
<!--- INSERT tsconfig.json IN THE CODE SNIPPET BELOW --->
3838

39-
</details>
39+
```json5
40+
41+
```
4042

41-
#### package.json
43+
</details>
4244

4345
<!--- paste your package.json below if relevant --->
4446
<details>
45-
<summary>`package.json`: </summary>
47+
<summary><h4><code>package.json</code></h4>: </summary>
4648

47-
<!--- INSERT package.json HERE --->
49+
<!--- INSERT package.json IN THE CODE SNIPPET BELOW --->
4850

49-
</details>
51+
```json
52+
53+
```
5054

51-
#### plugin output with verbosity 3
55+
</details>
5256

5357
<!--- add verbosity verbosity: 3 to plugin options and attach output if relevant (censor out anything sensitive) --->
5458
<details>
55-
<summary>plugin output with verbosity 3: </summary>
59+
<summary><h4>plugin output with verbosity 3</h4>: </summary>
5660

57-
<!--- INSERT plugin output HERE or attach --->
61+
<!--- INSERT plugin output IN THE CODE SNIPPET BELOW or attach --->
62+
63+
```text
64+
65+
```
5866

5967
</details>

0 commit comments

Comments
 (0)