aboutsummaryrefslogtreecommitdiff
path: root/src/blocks/text.c
blob: f2c1651997d8ae736708d5e818d90e1aa40918c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "scheme.h"

#include "../any_log.h"

static bool block_text_validate(block_t *block, const block_scheme_t *scheme)
{
    if (block->text.text == NULL) {
        log_error("Block '%s' requires key '%s'", block->label, "text");
        return false;
    }

    return true;
}

const block_scheme_t block_text_scheme = {
    .name = "text",
    .block = {
        .type = BLOCK_TEXT,
    },
    .size = 0,
    .entries = NULL,
    .validate = block_text_validate,
};