MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / is_atxheader

Function is_atxheader

libraries/hoedown/src/document.c:1453–1470  ·  view source on GitHub ↗

is_atxheader • returns whether the line is a hash-prefixed header */

Source from the content-addressed store, hash-verified

1451
1452/* is_atxheader • returns whether the line is a hash-prefixed header */
1453static int
1454is_atxheader(hoedown_document *doc, uint8_t *data, size_t size)
1455{
1456 if (data[0] != '#')
1457 return 0;
1458
1459 if (doc->ext_flags & HOEDOWN_EXT_SPACE_HEADERS) {
1460 size_t level = 0;
1461
1462 while (level < size && level < 6 && data[level] == '#')
1463 level++;
1464
1465 if (level < size && data[level] != ' ')
1466 return 0;
1467 }
1468
1469 return 1;
1470}
1471
1472/* is_headerline • returns whether the line is a setext-style hdr underline */
1473static int

Callers 2

parse_paragraphFunction · 0.85
parse_blockFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected