#include "support/debug.h"
#include "support/lassert.h"
#include "support/lstrings.h"
+#include "support/textutils.h"
#include <vector>
docstring newname;
docstring::const_iterator it = str.begin();
docstring::const_iterator en = str.end();
- for (; it != en; ++it)
- if (isalnum(*it))
- newname += *it;
- else
- newname += '_';
+ for (; it != en; ++it) {
+ char_type const c = *it;
+ newname += isAlnumASCII(c) ? c : char_type('_');
+ }
return newname;
}
if (nextraw_) {
os_ << c;
nextraw_ = false;
- } else
- os_ << html::escapeChar(c);
+ } else {
+ string const d = html::escapeChar(c);
+ os_ << from_ascii(d);
+ }
return *this;
}
if (!style.counter.empty())
buf.params().documentClass().counters().step(style.counter, OutputUpdate);
- openTag(xs, style);
+ openTag(xs, style, pbegin->params());
// Label around sectioning number:
// FIXME Probably need to account for LABEL_MANUAL