n_markdown_block
One block. More...
#include "n_markdown.h"
Public Attributes
| Name | |
|---|---|
| long | start With N_MARKDOWN_NESTED, OL: the number of its first item ("3. " gives 3). |
| size_t | n_items |
| size_t | n_cols TABLE: cells per row, always at least 1. |
| int | level HEADING: 1 to 6. |
| int | kind enum n_markdown_block_kind |
| n_markdown_inline * | items |
| n_markdown_inline | inl |
| int | depth With N_MARKDOWN_NESTED: how many list items the block sits under, 0 at the top. |
| char * | code |
| unsigned char * | align TABLE: N_MARKDOWN_ALIGN_* per column, [n_cols](Struct-n_markdown_block#user-content-variable-n_cols) entries, owned. |
Detailed Description
struct n_markdown_block;
One block.
inl holds spans for PARA/QUOTE/HEADING; code holds the raw text for CODE_BLOCK (owned, NUL-terminated, else NULL); items holds the list rows for UL/OL and the cells for TABLE (else NULL).
A TABLE's cells are stored in [items](Struct-n_markdown_block#user-content-variable-items) row by row, [n_cols](Struct-n_markdown_block#user-content-variable-n_cols) to a row, so cell (r, c) is [items](Struct-n_markdown_block#user-content-variable-items)[r * [n_cols](Struct-n_markdown_block#user-content-variable-n_cols) + c] and there are [n_items](Struct-n_markdown_block#user-content-variable-n_items) / [n_cols](Struct-n_markdown_block#user-content-variable-n_cols) rows. The first row is the header. [align](Struct-n_markdown_block#user-content-variable-align) has one entry per column. Two arrays and no nested type: it is the same flat model the spans use, and [n_markdown_free](n__markdown_8c#user-content-function-n_markdown_free) already knew how to release [items](Struct-n_markdown_block#user-content-variable-items).
Public Attributes Documentation
variable start
long start;
With N_MARKDOWN_NESTED, OL: the number of its first item ("3. " gives 3).
0 without it, and for every other kind: count from 1.
variable n_items
size_t n_items;
variable n_cols
size_t n_cols;
TABLE: cells per row, always at least 1.
Zero for every other kind.
variable level
int level;
HEADING: 1 to 6.
Zero for every other kind.
variable kind
int kind;
enum n_markdown_block_kind
variable items
n_markdown_inline * items;
variable inl
n_markdown_inline inl;
variable depth
int depth;
With N_MARKDOWN_NESTED: how many list items the block sits under, 0 at the top.
Always 0 without it.
variable code
char * code;
variable align
unsigned char * align;
TABLE: N_MARKDOWN_ALIGN_* per column, [n_cols](Struct-n_markdown_block#user-content-variable-n_cols) entries, owned.
NULL for every other kind.
Modules
- AABB3D
- ACCEPT_POOL
- ALLEGRO4
- ALLEGRO5
- ANIM_LIB
- ASTAR
- ATLAS_LIB
- AVRO
- CLOCK_SYNC
- COMMONS
- CONFIGFILE
- CYPHER_BASE64
- CYPHER_VIGENERE
- DEAD_RECKONING
- ENUMS
- EXCEPTIONS
- GAME_ENV
- GIT
- GUI
- HASH_TABLE
- ISOMETRIC_ENGINE
- LIST
- LOG
- LOGNODUP
- LZ4
- NETWORKING
- NETWORK_MSG
- N_COOKIES
- N_DIFF
- N_DIGEST
- N_DISK_CACHE
- N_DNS
- N_ECC
- N_ENTROPY
- N_FILES
- N_FLUIDS
- N_GUI_COLOR
- N_GUI_COLORWHEEL
- N_GUI_CURVE
- N_GUI_GRID
- N_GUI_POPUP
- N_HEX
- N_HTTP3
- N_HTTP_COOKIE
- N_HTTP_FORM
- N_HTTP_MIME
- N_HTTP_REQ
- N_HTTP_RESP
- N_HTTP_ROUTER
- N_HTTP_SERVER
- N_ICC
- N_JSON
- N_KAFKA
- N_LINALG
- N_MODULE
- N_OPENSSL_COMPAT
- N_PRETTY
- N_PTH
- N_QUERY
- N_RANDOM
- N_SHA256
- N_STR
- N_TIFF
- N_TIME
- N_USER
- N_X509
- N_ZIP
- PARTICLES
- PCRE
- PHYSICS
- SIGNALS
- STACK
- THREADS
- TRAJECTORY
- TREE
- ZLIB