-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
620 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { ifNil } from "@core/vim"; | ||
|
||
export class SpanProperties { | ||
properties: LuaTable<string, string>; | ||
|
||
constructor(properties?: LuaTable<string, string>) { | ||
this.properties = ifNil(properties, new LuaTable<string, string>())!; | ||
} | ||
|
||
get(name: string): string | undefined { | ||
return this.properties.get(name); | ||
} | ||
|
||
set(name: string, value: string) { | ||
this.properties.set(name, value); | ||
} | ||
|
||
pack(): string { | ||
let res = ""; | ||
for (let [key, value] of this.properties) { | ||
res += ` ${key}="${value}"`; | ||
} | ||
return res; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export interface MarkupLine { | ||
text: string; | ||
} | ||
|
||
export interface MarkupParagraph { | ||
lines: MarkupLine[]; | ||
} | ||
|
||
export type TranslateResult = MarkupLine | MarkupParagraph; |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.