Cleanup - fix various tests.
This commit is contained in:
@@ -219,14 +219,12 @@ export class UnicodeV11 implements IUnicodeVersionProvider {
|
||||
return 1;
|
||||
}
|
||||
|
||||
charProperties(codepoint: number, preceding: UnicodeCharProperties): UnicodeCharProperties {
|
||||
public charProperties(codepoint: number, preceding: UnicodeCharProperties): UnicodeCharProperties {
|
||||
let width = this.wcwidth(codepoint);
|
||||
let shouldJoin = width === 0;
|
||||
let shouldJoin = width === 0 && preceding !== 0;
|
||||
if (shouldJoin) {
|
||||
let oldWidth = preceding === 0 ? 0
|
||||
: UnicodeService.extractWidth(preceding);
|
||||
const oldWidth = UnicodeService.extractWidth(preceding);
|
||||
if (oldWidth === 0) {
|
||||
width = 1;
|
||||
shouldJoin = false;
|
||||
} else if (oldWidth > width) {
|
||||
width = oldWidth;
|
||||
|
||||
Reference in New Issue
Block a user