Skip to content

Commit

Permalink
Prevent github adding a <p> tag to <td> in issue table
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickkempff committed Nov 5, 2018
1 parent 2a64e19 commit 06c5a40
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ exports[`generating inline messages Shows correct message for multiple inline vi
DangerID: danger-id-blankID;
File: File.swift;
Line: 10;
-->
-->
- :no_entry_sign: Test message
- :no_entry_sign: Warning message
- :warning: Test message
Expand Down Expand Up @@ -43,18 +43,12 @@ exports[`generating inline messages Shows correct messages for inline/regular vi
</thead>
<tbody><tr>
<td>:warning:</td>
<td>
**File.swift#L10** - Test message
</td>
<td>**File.swift#L10** - Test message</td>
</tr>
<tr>
<td>:warning:</td>
<td>
Warning message
</td>
<td>Warning message</td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -86,10 +80,7 @@ exports[`generating messages leaves space between <td>s to allow GitHub to rende
</thead>
<tbody><tr>
<td>:no_entry_sign:</td>
<td>
**Failure:** Something failed!
</td>
<td>**Failure:** Something failed!</td>
</tr>
</tbody>
</table>
Expand All @@ -104,10 +95,7 @@ exports[`generating messages leaves space between <td>s to allow GitHub to rende
</thead>
<tbody><tr>
<td>:warning:</td>
<td>
_Maybe you meant to run \`yarn install\`?_
</td>
<td>_Maybe you meant to run \`yarn install\`?_</td>
</tr>
</tbody>
</table>
Expand All @@ -122,14 +110,11 @@ exports[`generating messages leaves space between <td>s to allow GitHub to rende
</thead>
<tbody><tr>
<td>:book:</td>
<td>
\`\`\`ts
<td>\`\`\`ts
function add(a: number, b: number): number {
return a + b
}
\`\`\`
</td>
\`\`\`</td>
</tr>
</tbody>
</table>
Expand Down
7 changes: 2 additions & 5 deletions source/runner/templates/githubIssueTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ function table(name: string, emoji: string, violations: Violation[]): string {
const message = isInline(v) ? `**${v.file!}#L${v.line!}** - ${v.message}` : v.message
return `<tr>
<td>:${emoji}:</td>
<td>
${message}
</td>
<td>${message}</td>
</tr>
`
})
Expand Down Expand Up @@ -103,7 +100,7 @@ export function inlineTemplate(dangerID: string, results: DangerResults, file: s
<!--
${buildSummaryMessage(dangerID, results)}
${fileLineToString(file, line)}
-->
-->
${results.fails.map(printViolation("no_entry_sign")).join("\n")}
${results.warnings.map(printViolation("warning")).join("\n")}
${results.messages.map(printViolation("book")).join("\n")}
Expand Down

0 comments on commit 06c5a40

Please sign in to comment.