Skip to content

Demo

Here is an example on how when you add lines of codes it looks

Code Annotation Examples

Codeblocks

Some code goes here.

Plain codeblock

A plain codeblock:

Some code here
def myfunction()
// some comment

Code for a specific language

Some more code with the py at the start:

import tensorflow as tf
def whatever()

With a title

bubble_sort.py
def bubble_sort(items):
    for i in range(len(items)):
        for j in range(len(items) - 1 - i):
            if items[j] > items[j + 1]:
                items[j], items[j + 1] = items[j + 1], items[j]

With line numbers

1
2
3
4
5
def bubble_sort(items):
    for i in range(len(items)):
        for j in range(len(items) - 1 - i):
            if items[j] > items[j + 1]:
                items[j], items[j + 1] = items[j + 1], items[j]

Highlighting lines

def bubble_sort(items):
    for i in range(len(items)):
        for j in range(len(items) - 1 - i):
            if items[j] > items[j + 1]:
                items[j], items[j + 1] = items[j + 1], items[j]

Icons and Emojs

Emoji

This is an emoji Hello world. This is an emoji

JavaScript arrow function

const hello = () => console.log("Hello, world!")

😄