mirror of
https://github.com/kevinboone/epub2txt2
synced 2026-04-25 14:24:56 +02:00
Test fix for bug #26
This commit is contained in:
@@ -238,6 +238,12 @@ void _wraptext_wrap_next (WrapTextContext *context, const WT_UTF32 c)
|
||||
|
||||
// STATE_WORD
|
||||
|
||||
else if (state == WT_STATE_WORD && c == WT_HARD_LINE_BREAK)
|
||||
{
|
||||
_wraptext_flush_token (context);
|
||||
_wraptext_new_line (context);
|
||||
state = WT_STATE_START;
|
||||
}
|
||||
else if (state == WT_STATE_WORD && _wraptext_is_newline (c))
|
||||
{
|
||||
_wraptext_flush_token (context);
|
||||
|
||||
@@ -13,6 +13,9 @@
|
||||
// UTF8, including a terminating 0
|
||||
#define WT_UTF8_MAX_BYTES 8
|
||||
|
||||
// Hard line break should be an unusued code point
|
||||
#define WT_HARD_LINE_BREAK 9999
|
||||
|
||||
typedef uint32_t WT_UTF32;
|
||||
typedef char WT_UTF8;
|
||||
|
||||
|
||||
@@ -632,7 +632,8 @@ void xhtml_flush_para (const WString *para, const Epub2TxtOptions *options,
|
||||
void xhtml_line_break (WrapTextContext *context)
|
||||
{
|
||||
IN
|
||||
static uint32_t s[2] = { '\n', 0 };
|
||||
//static uint32_t s[2] = { '\n', 0 };
|
||||
static uint32_t s[2] = { WT_HARD_LINE_BREAK, 0 };
|
||||
wraptext_wrap_utf32 (context, s);
|
||||
wraptext_eof (context);
|
||||
OUT
|
||||
|
||||
Reference in New Issue
Block a user