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

@zswang zswang 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

@sincerefly sincerefly 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

@csrvermaak csrvermaak commented Nov 19, 2015

test

-function()
+function(arg1)
@paomian

This comment has been minimized.

Copy link

@paomian paomian commented Nov 19, 2015

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

This comment has been minimized.

Copy link

@chenzxcvb chenzxcvb commented Nov 20, 2015

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

This comment has been minimized.

Copy link

@KittyGiraudel KittyGiraudel commented Nov 20, 2015

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

This comment has been minimized.

Copy link

@struCoder struCoder commented Nov 21, 2015

interesting

@beardyco

This comment has been minimized.

Copy link

@beardyco beardyco commented Nov 30, 2015

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

This comment has been minimized.

Copy link

@4ft35t 4ft35t commented Nov 30, 2015

-print 123
+print(123)
@BigKuCha

This comment has been minimized.

Copy link

@BigKuCha BigKuCha commented Nov 30, 2015

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

This comment has been minimized.

Copy link

@dcb9 dcb9 commented Nov 30, 2015

- Elephant
+ PHP
@leecade

This comment has been minimized.

Copy link

@leecade leecade commented Nov 30, 2015

- before
+ after
@smoothdvd

This comment has been minimized.

Copy link

@smoothdvd smoothdvd commented Nov 30, 2015

- bad
+ good
@herecydev

This comment has been minimized.

Copy link

@herecydev herecydev commented Nov 30, 2015

- boring
+ awesome
@stereokai

This comment has been minimized.

Copy link

@stereokai stereokai commented Nov 30, 2015

Intertesting

- meh
+ woot
@augustoproiete

This comment has been minimized.

Copy link

@augustoproiete augustoproiete commented Nov 30, 2015

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

This comment has been minimized.

Copy link

@bigandy bigandy commented Dec 2, 2015

-light
+dark
@fernandoguedes

This comment has been minimized.

Copy link

@fernandoguedes fernandoguedes commented Dec 2, 2015

-war
+peace
@p3t3r67x0

This comment has been minimized.

Copy link

@p3t3r67x0 p3t3r67x0 commented Dec 2, 2015

-mean.js
+sean.js
@reederz

This comment has been minimized.

Copy link

@reederz reederz commented Dec 3, 2015

-Hello
+Good day!
@jabranr

This comment has been minimized.

Copy link

@jabranr jabranr commented Dec 4, 2015

- Foo
+ Bar
@ReptarAzar

This comment has been minimized.

Copy link

@ReptarAzar ReptarAzar commented Dec 7, 2015

- War
+ Peas
@hallaji

This comment has been minimized.

Copy link

@hallaji hallaji commented Dec 10, 2015

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

This comment has been minimized.

Copy link

@arman-arian arman-arian commented Dec 10, 2015

- Hate
+ Love
@Aspsine

This comment has been minimized.

Copy link

@Aspsine Aspsine commented Dec 14, 2015

- foo
+ bar
@haohcraft

This comment has been minimized.

Copy link

@haohcraft haohcraft commented Dec 14, 2015

+ foo
+ bar
@code0wl

This comment has been minimized.

Copy link

@code0wl code0wl commented Dec 20, 2015

- old skool
+ reactive programming
@oyeharry

This comment has been minimized.

Copy link

@oyeharry oyeharry commented Dec 20, 2015

- boom
+ whoa
@learningjs

This comment has been minimized.

Copy link

@learningjs learningjs commented Dec 28, 2015

-foo
+bar
@Dauch

This comment has been minimized.

Copy link

@Dauch Dauch commented Jan 20, 2016

- foo
+ bar
@csgui

This comment has been minimized.

Copy link

@csgui csgui commented Jan 22, 2016

- Callbacks
+ Observables
@ivanchuk

This comment has been minimized.

Copy link

@ivanchuk ivanchuk commented Feb 1, 2016

- words
+ facts
@nayzawoo

This comment has been minimized.

Copy link

@nayzawoo nayzawoo commented Dec 17, 2016

- old
+ new
@basecss

This comment has been minimized.

Copy link

@basecss basecss commented Feb 23, 2017

- old
+ new
@yangnianbing

This comment has been minimized.

Copy link

@yangnianbing yangnianbing commented May 23, 2017

- meh
+ woot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment