Implement FontStyle.Strikethrough
This commit is contained in:
Родитель
d87b3d53fc
Коммит
da69f6ad69
12
src/main.ts
12
src/main.ts
|
@ -214,24 +214,24 @@ export interface ITokenizeLineResult {
|
|||
* 1098 7654 3210 9876 5432 1098 7654 3210
|
||||
* - -------------------------------------------
|
||||
* xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
|
||||
* bbbb bbbb bfff ffff ffFF FTTT LLLL LLLL
|
||||
* bbbb bbbb bfff ffff ffFF FFTT LLLL LLLL
|
||||
* - -------------------------------------------
|
||||
* - L = LanguageId (8 bits)
|
||||
* - T = StandardTokenType (3 bits)
|
||||
* - F = FontStyle (3 bits)
|
||||
* - T = StandardTokenType (2 bits)
|
||||
* - F = FontStyle (4 bits)
|
||||
* - f = foreground color (9 bits)
|
||||
* - b = background color (9 bits)
|
||||
*/
|
||||
export const enum MetadataConsts {
|
||||
LANGUAGEID_MASK = 0b00000000000000000000000011111111,
|
||||
TOKEN_TYPE_MASK = 0b00000000000000000000011100000000,
|
||||
FONT_STYLE_MASK = 0b00000000000000000011100000000000,
|
||||
TOKEN_TYPE_MASK = 0b00000000000000000000001100000000,
|
||||
FONT_STYLE_MASK = 0b00000000000000000011110000000000,
|
||||
FOREGROUND_MASK = 0b00000000011111111100000000000000,
|
||||
BACKGROUND_MASK = 0b11111111100000000000000000000000,
|
||||
|
||||
LANGUAGEID_OFFSET = 0,
|
||||
TOKEN_TYPE_OFFSET = 8,
|
||||
FONT_STYLE_OFFSET = 11,
|
||||
FONT_STYLE_OFFSET = 10,
|
||||
FOREGROUND_OFFSET = 14,
|
||||
BACKGROUND_OFFSET = 23
|
||||
}
|
||||
|
|
|
@ -9,7 +9,8 @@ export const enum FontStyle {
|
|||
None = 0,
|
||||
Italic = 1,
|
||||
Bold = 2,
|
||||
Underline = 4
|
||||
Underline = 4,
|
||||
Strikethrough = 8
|
||||
}
|
||||
|
||||
export class ParsedThemeRule {
|
||||
|
@ -119,6 +120,9 @@ export function parseTheme(source: IRawTheme | undefined): ParsedThemeRule[] {
|
|||
case 'underline':
|
||||
fontStyle = fontStyle | FontStyle.Underline;
|
||||
break;
|
||||
case 'strikethrough':
|
||||
fontStyle = fontStyle | FontStyle.Strikethrough;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче