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 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 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 commented Nov 19, 2015

test

-function()
+function(arg1)
@paomian

This comment has been minimized.

Copy link

paomian commented Nov 19, 2015

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

This comment has been minimized.

Copy link

Luna4 commented Nov 20, 2015

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

This comment has been minimized.

Copy link

HugoGiraudel commented Nov 20, 2015

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

This comment has been minimized.

Copy link

struCoder commented Nov 21, 2015

interesting

@beardyco

This comment has been minimized.

Copy link

beardyco commented Nov 30, 2015

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

This comment has been minimized.

Copy link

4ft35t commented Nov 30, 2015

-print 123
+print(123)
@BigKuCha

This comment has been minimized.

Copy link

BigKuCha commented Nov 30, 2015

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

This comment has been minimized.

Copy link

dcb9 commented Nov 30, 2015

- Elephant
+ PHP
@leecade

This comment has been minimized.

Copy link

leecade commented Nov 30, 2015

- before
+ after
@smoothdvd

This comment has been minimized.

Copy link

smoothdvd commented Nov 30, 2015

- bad
+ good
@herecydev

This comment has been minimized.

Copy link

herecydev commented Nov 30, 2015

- boring
+ awesome
@stereokai

This comment has been minimized.

Copy link

stereokai commented Nov 30, 2015

Intertesting

- meh
+ woot
@caioproiete

This comment has been minimized.

Copy link

caioproiete commented Nov 30, 2015

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

This comment has been minimized.

Copy link

bigandy commented Dec 2, 2015

-light
+dark
@fernandoguedes

This comment has been minimized.

Copy link

fernandoguedes commented Dec 2, 2015

-war
+peace
@p3t3r67x0

This comment has been minimized.

Copy link

p3t3r67x0 commented Dec 2, 2015

-mean.js
+sean.js
@reederz

This comment has been minimized.

Copy link

reederz commented Dec 3, 2015

-Hello
+Good day!
@jabranr

This comment has been minimized.

Copy link

jabranr commented Dec 4, 2015

- Foo
+ Bar
@ReptarAzar

This comment has been minimized.

Copy link

ReptarAzar commented Dec 7, 2015

- War
+ Peas
@hallaji

This comment has been minimized.

Copy link

hallaji commented Dec 10, 2015

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

This comment has been minimized.

Copy link

arman-arian commented Dec 10, 2015

- Hate
+ Love
@Aspsine

This comment has been minimized.

Copy link

Aspsine commented Dec 14, 2015

- foo
+ bar
@haohcraft

This comment has been minimized.

Copy link

haohcraft commented Dec 14, 2015

+ foo
+ bar
@code0wl

This comment has been minimized.

Copy link

code0wl commented Dec 20, 2015

- old skool
+ reactive programming
@oyeharry

This comment has been minimized.

Copy link

oyeharry commented Dec 20, 2015

- boom
+ whoa
@learningjs

This comment has been minimized.

Copy link

learningjs commented Dec 28, 2015

-foo
+bar
@Dauch

This comment has been minimized.

Copy link

Dauch commented Jan 20, 2016

- foo
+ bar
@csgui

This comment has been minimized.

Copy link

csgui commented Jan 22, 2016

- Callbacks
+ Observables
@ivanchuk

This comment has been minimized.

Copy link

ivanchuk commented Feb 1, 2016

- words
+ facts
@nayzawoo

This comment has been minimized.

Copy link

nayzawoo commented Dec 17, 2016

- old
+ new
@basecss

This comment has been minimized.

Copy link

basecss commented Feb 23, 2017

- old
+ new
@yangnianbing

This comment has been minimized.

Copy link

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
You can’t perform that action at this time.