feat(core): marker normalization 🙀

- literally a bad assert. the error case is handled below, in fact the unit test tests for it.
- for some reason, assert.h wasn't included in some cases locally.

For: #9468
This commit is contained in:
Steven R. Loomis 2023-11-16 12:11:41 -06:00
parent 3905c6d41d
commit 4bbafa6903

View file

@ -10,10 +10,7 @@
#include <algorithm>
#include <string>
#include "kmx/kmx_xstring.h"
#ifndef assert
#define assert(x) ((void)0)
#endif
#include <assert.h>
namespace km {
namespace core {
@ -1004,7 +1001,6 @@ std::u32string remove_markers(const std::u32string &str, marker_map *markers) {
}
// #2 LDML_MARKER_CODE
assert(*i == LDML_MARKER_CODE);
if (*i != LDML_MARKER_CODE) {
continue; // can't process this, get out
}