Diffs on .md files trigger syntax errors
amercier opened this issue · 0 comments
amercier commented
Example
How to reproduce
- Create a PR with a
.md
file containing a Mermaid chart. - Add a new commit that edits the chart
- Go to the PR, select the last commit only
- Click on "Display the rich diff" button
Possible solution
Handle diff situation differently. Here's the HTML:
<pre lang="mermaid" class="rich-diff-level-one" data-processed="true">
<code>graph TD
<ins>A[/f2/*] -> B{Is the cart empty?}</ins>
<ins>B -->|Yes| C(Redirect to `/f2/cart`)</ins>
<ins>B -->|No| D(Render page)</ins>
<del>A{Is the cart empty?}</del>
<del>A -->|Yes| B(Redirect to `/f2/cart`)</del>
<del>A -->|No| C(Render page)</del>
</code>
</pre>