Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to show migration guides in GitHub Markdown

How to show migration guides in GitHub Markdown

Use the diff code highlighting tag.

  ```diff
  - foo
  + bar

Example:

-function () {
+function greet() {
   console.log('Hello world');
 }
@zswang

This comment has been minimized.

Copy link

commented Nov 19, 2015

test

@@ -18,12 +18,14 @@ module.exports = function processor(content, attrs, scope) {
   var data;
   if (attrs.data) {
     /*jslint evil: true */
-    data = new Function(
-      'return (' +
-      scope.execImport(attrs.data) +
-      ');'
-    )();
-  } else {
+    data = scope.execImport(attrs.data);
+    if (typeof data === 'string') {
+      data = new Function(
+        'return (' + data + ');'
+      )();
+    }
+  }
+  else {
     data = null;
   }
   return scope.compile(render(data));
@sincerefly

This comment has been minimized.

Copy link

commented Nov 19, 2015

test

#!/bin/env python
#encoding:utf-8
- print "hello python!";
+ print "hello world!";
@csrvermaak

This comment has been minimized.

Copy link

commented Nov 19, 2015

test

-function()
+function(arg1)
@paomian

This comment has been minimized.

Copy link

commented Nov 19, 2015

- printf("hello world");
+ (println "hello world")
@Luna4

This comment has been minimized.

Copy link

commented Nov 20, 2015

-console.log(124)
+console.log('hello')
@HugoGiraudel

This comment has been minimized.

Copy link

commented Nov 20, 2015

-text-transform: uppercase;
+TEXT-TRANSFORM: UPPERCASE;
@struCoder

This comment has been minimized.

Copy link

commented Nov 21, 2015

interesting

@beardyco

This comment has been minimized.

Copy link

commented Nov 30, 2015

-function () {
+function greet() {
   console.log('Hello world');
 }
@4ft35t

This comment has been minimized.

Copy link

commented Nov 30, 2015

-print 123
+print(123)
@BigKuCha

This comment has been minimized.

Copy link

commented Nov 30, 2015

-hello :cop:
+hello world :smile:
@dcb9

This comment has been minimized.

Copy link

commented Nov 30, 2015

- Elephant
+ PHP
@leecade

This comment has been minimized.

Copy link

commented Nov 30, 2015

- before
+ after
@smoothdvd

This comment has been minimized.

Copy link

commented Nov 30, 2015

- bad
+ good
@herecydev

This comment has been minimized.

Copy link

commented Nov 30, 2015

- boring
+ awesome
@stereokai

This comment has been minimized.

Copy link

commented Nov 30, 2015

Intertesting

- meh
+ woot
@caioproiete

This comment has been minimized.

Copy link

commented Nov 30, 2015

-this is kind of cool
+this is awesome!!!!!
@bigandy

This comment has been minimized.

Copy link

commented Dec 2, 2015

-light
+dark
@fernandoguedes

This comment has been minimized.

Copy link

commented Dec 2, 2015

-war
+peace
@webtobesocial

This comment has been minimized.

Copy link

commented Dec 2, 2015

-mean.js
+sean.js
@reederz

This comment has been minimized.

Copy link

commented Dec 3, 2015

-Hello
+Good day!
@jabranr

This comment has been minimized.

Copy link

commented Dec 4, 2015

- Foo
+ Bar
@ReptarAzar

This comment has been minimized.

Copy link

commented Dec 7, 2015

- War
+ Peas
@hallaji

This comment has been minimized.

Copy link

commented Dec 10, 2015

- Let's see
+ That sounds great
@arman-arian

This comment has been minimized.

Copy link

commented Dec 10, 2015

- Hate
+ Love
@Aspsine

This comment has been minimized.

Copy link

commented Dec 14, 2015

- foo
+ bar
@haohcraft

This comment has been minimized.

Copy link

commented Dec 14, 2015

+ foo
+ bar
@code0wl

This comment has been minimized.

Copy link

commented Dec 20, 2015

- old skool
+ reactive programming
@oyeharry

This comment has been minimized.

Copy link

commented Dec 20, 2015

- boom
+ whoa
@learningjs

This comment has been minimized.

Copy link

commented Dec 28, 2015

-foo
+bar
@Dauch

This comment has been minimized.

Copy link

commented Jan 20, 2016

- foo
+ bar
@csgui

This comment has been minimized.

Copy link

commented Jan 22, 2016

- Callbacks
+ Observables
@ivanchuk

This comment has been minimized.

Copy link

commented Feb 1, 2016

- words
+ facts
@nayzawoo

This comment has been minimized.

Copy link

commented Dec 17, 2016

- old
+ new
@basecss

This comment has been minimized.

Copy link

commented Feb 23, 2017

- old
+ new
@yangnianbing

This comment has been minimized.

Copy link

commented May 23, 2017

- meh
+ woot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.