Skip to content

Instantly share code, notes, and snippets.

@0xCourtney
Forked from leetrout/example.md
Created October 7, 2020 17:14
Show Gist options
  • Save 0xCourtney/22443c016131e4f7223ea7b3cb54df61 to your computer and use it in GitHub Desktop.
Save 0xCourtney/22443c016131e4f7223ea7b3cb54df61 to your computer and use it in GitHub Desktop.
Markdown Diffs

The current code looks like this:

type Demo struct {
  Field        int
  AnotherField string
}

We actually need to track the Thing

 type Demo struct {
   Field        int
   AnotherField string
+  Thing        float64
 }

And we need to swap out the Field:

 type Demo struct {
-   Field        int
+   FieldFixed   int
    AnotherField string
    Thing        float64
 }

You can use diff as the "type" in code fences: (note using apostophe instead of backticks for demonstration purposes)

'''diff
+Added a thing
-Removed a thing
 Nothing changed
'''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment