Comentários: separadores com no máximo "---"
Trechos com quatro ou mais hífens dentro de comentários viram "---" (strings não mudam). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
374b445a8f
commit
80bd330766
40 files changed
+137
-137
No files matched your search
@@ -17,7 +17,7 @@
|
||||
static char s_err[160] = "";
|
||||
const char* tb_syntax_last_error(void) { return s_err; }
|
||||
|
||||
/* ---------------------------------------------------------------- Buffer */
|
||||
/* --- Buffer */
|
||||
typedef struct { char* p; size_t n, cap; } Buf;
|
||||
|
||||
static bool b_reserve(Buf* b, size_t extra) {
|
||||
@@ -46,7 +46,7 @@ static void b_esc(Buf* b, const char* s, size_t n) {
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------- Token tip */
|
||||
/* --- Token tip */
|
||||
typedef enum { T_PLAIN, T_KW, T_TYPE, T_STR, T_NUM, T_CMT, T_PRE,
|
||||
T_FN, T_OP, T_PUNC, T_ID } TK;
|
||||
|
||||
@@ -96,7 +96,7 @@ const char* tb_syntax_type_color(const char* type) {
|
||||
return tk_color(T_PLAIN);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ Linguagens */
|
||||
/* --- Linguagens */
|
||||
typedef struct {
|
||||
const char* name;
|
||||
const char* aliases; /* separados por espaco */
|
||||
@@ -218,7 +218,7 @@ static bool word_in(const char* list, const char* w, size_t n) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------- Emissao */
|
||||
/* --- Emissao */
|
||||
static bool emit(Buf* b, TK k, const char* s, size_t n, bool inline_mode) {
|
||||
(void)inline_mode;
|
||||
if (n == 0) return true;
|
||||
@@ -232,7 +232,7 @@ static bool emit(Buf* b, TK k, const char* s, size_t n, bool inline_mode) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------- Tokenizadores */
|
||||
/* --- Tokenizadores */
|
||||
static bool is_id_start(int c) { return isalpha(c) || c == '_'; }
|
||||
static bool is_id_char(int c) { return isalnum(c) || c == '_'; }
|
||||
static bool is_op(int c) {
|
||||
@@ -386,7 +386,7 @@ static void tok_md(Buf* b, const char* s, bool inline_mode) {
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------- Render */
|
||||
/* --- Render */
|
||||
char* tb_syntax_highlight_inline(const char* text, const char* lang) {
|
||||
s_err[0] = 0;
|
||||
if (!text) text = "";
|
||||
@@ -435,7 +435,7 @@ char* tb_syntax_highlight(const char* text, const char* lang) {
|
||||
return b.p;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------- Blocos */
|
||||
/* --- Blocos */
|
||||
|
||||
static void eval_highlight(TinyBlocks_Block* self, TinyBlocks* rt) {
|
||||
char* x = tb_syntax_highlight(tb_block_input_text(self, rt, 0), tb_block_input_text(self, rt, 1));
|
||||
|
||||
Reference in new issue
Block a user