Code Block

-- fastn.dependency: fastn-community.github.io/code-block
Lang:
ftd

Basic code example

Input
-- cb.code:
lang: java

if (condition) {
    // code block
    statement1;
    statement2;
    // ...
}
Lang:
ftd
Output
if (condition) {
    // code block
    statement1;
    statement2;
    // ...
}
Lang:
java

Download code block in a file

Input
-- cb.code:
lang: java
download: example.java

if (condition) {
    // code block
    statement1;
    statement2;
    // ...
}
Lang:
ftd
Output
if (condition) {
    // code block
    statement1;
    statement2;
    // ...
}
example.java
Lang:
java

Copy false

Input
-- cb.code:
lang: java
copy: false

if (condition) {
    // code block
    statement1;
    statement2;
    // ...
}
Lang:
ftd
Output
if (condition) {
    // code block
    statement1;
    statement2;
    // ...
}
Lang:
java

ftd lang example

Input
-- cb.code:
lang: ftd

-- ftd.text: Hello I am fastn lang
role: $inherited.types.copy-regular
color: $inherited.colors.text-strong
Lang:
ftd
Output
-- ftd.text: Hello I am fastn lang
role: $inherited.types.copy-regular
color: $inherited.colors.text-strong
Lang:
ftd
Copyright © 2023 - FifthTry