Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ohler55 committed Jan 11, 2025
1 parent a9a4aa7 commit e05471a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ext/ox/parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,15 @@ static void read_instruction(PInfo pi) {
} else {
pi->pcb->instruct(pi, target, attrs.head, content_ptr);
}
} else {
for (Attr a = attrs.head; a < attrs.tail; a++) {
if (0 == strcasecmp(a->name, "encoding")) {
strncpy(pi->options->encoding, a->value, sizeof(pi->options->encoding) - 1);
pi->options->encoding[sizeof(pi->options->encoding) - 1] = '\0';
pi->options->rb_enc = rb_enc_find(a->value);
break;
}
}
}
attr_stack_cleanup(&attrs);
if (content_ptr != content) {
Expand Down

0 comments on commit e05471a

Please sign in to comment.