Demo


A Gist with no additional configuration.

export default function compare<T>(a0: T, b0: T): number {
if (a0 === b0) return 0;
if (a0 > b0) return 1;
return -1;
}
view raw gist-test.ts hosted with ❤ by GitHub

HTML

<code>gist:darylwright/75332f27a6e9bff70bc0406114570829</code>

Markdown

`gist:darylwright/75332f27a6e9bff70bc0406114570829`

A Gist with lines removed.

export default function compare<T>(a0: T, b0: T): number {
}
view raw gist-test.ts hosted with ❤ by GitHub

HTML

<code>gist:darylwright/75332f27a6e9bff70bc0406114570829?file=gist-test.ts&lines=2-4</code>

Markdown

`gist:darylwright/75332f27a6e9bff70bc0406114570829?file=gist-test.ts&lines=2-4`

A Gist with highlighted lines

export default function compare<T>(a0: T, b0: T): number {
if (a0 === b0) return 0;
if (a0 > b0) return 1;
return -1;
}
view raw gist-test.ts hosted with ❤ by GitHub

HTML

<code>gist:darylwright/75332f27a6e9bff70bc0406114570829?file=gist-test.ts&highlights=1,3-5</code>

Markdown

`gist:darylwright/75332f27a6e9bff70bc0406114570829?file=gist-test.ts&highlights=1,3-5`

A Gist with highlighted and removed lines

export default function compare<T>(a0: T, b0: T): number {
}
view raw gist-test.ts hosted with ❤ by GitHub

HTML

<code>gist:darylwright/75332f27a6e9bff70bc0406114570829?file=gist-test.ts&highlights=1&lines=2-4</code>

Markdown

`gist:darylwright/75332f27a6e9bff70bc0406114570829?file=gist-test.ts&highlights=1&lines=2-4`

A Gist containing multiple files

const twitterUrlRegex = /(https?:\/\/)(www.)?twitter.com\//g;
export function getTwitterHandleFromUrl(profileUrl: string): string {
const twitterUserName = profileUrl.replaceAll(twitterUrlRegex, ``);
if (twitterUserName) {
return `@${twitterUserName}`;
}
return ``;
}
view raw gist-test0.ts hosted with ❤ by GitHub
export default function getReadingTimeText(duration: number): string {
const roundedDuration = Math.ceil(duration);
if (roundedDuration === 1) {
return `${roundedDuration} min`;
}
return `${roundedDuration} mins`;
}
view raw gist-test1.ts hosted with ❤ by GitHub

HTML

<code>gist:darylwright/f0bf18c86c236c2daf7fcaf28ec759be</code>

Markdown

`gist:darylwright/75332f27a6e9bff70bc0406114570829?file=gist-test.ts&highlights=1&lines=2-4`
Copyright © 2023 Golden Path Technologies Inc.