This commit is contained in:
_N3m0 2024-01-04 22:33:20 +01:00
parent 3603776303
commit 562449a727
2 changed files with 17 additions and 4 deletions

19
eval.c
View File

@ -15,11 +15,13 @@ void print_text(const char* text, int len){
for (int i=0; i<len; i++){
if (state.beginLine) printf("\n");
printf("%c", text[i]);
state.y++;
state.beginLine = 0;
if (text[i] != '\n'){
printf("%c", text[i]);
state.y++;
state.beginLine = 0;
}
if (state.y >= PAGE_WIDTH || text[i] == '\n'){
if (!state.beginLine && (state.y >= PAGE_WIDTH || text[i] == '\n')){
state.y = 0;
state.x++;
state.beginLine = 1;
@ -128,4 +130,13 @@ void evaluate(Token* token){
break_line();
print_text(EXPAND_LIT("-------------------------------------------------------------------------------"));
}
else if (token->type == BLOCKQUOTE)
{
print_text(EXPAND_LIT(" "));
printf(FC_SWAP);
}
else if (token->type == END_BLOCKQUOTE)
{
printf(FC_nSWAP);
}
}

2
main.c
View File

@ -8,6 +8,8 @@ int main(int argc, char* argv[]){
getUserConfig(argc, argv);
getPage();
//printPage();
Token* token = NULL;
do {
token = nexttoken();