Improve markdown presentation (#245)
Signed-off-by: Jerome Luckenbach <github@luckenba.ch>pull/253/head
parent
9daa771c1d
commit
ad81ff13f4
|
@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- Dependency fixes (#239)
|
||||
- Repository automation (ff9de716cd2473f24d9868fd2d19ebc3f366e7a4)
|
||||
- Small fixes (#241)
|
||||
- Improve item hover (#242, #244, #245)
|
||||
|
||||
## [0.8.1] - 2021-02-28
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ The extension is designed with openHAB 2.x in mind - most snippets and design pa
|
|||
- Quick openHAB console access
|
||||
- Add Items to Sitemap with one click
|
||||
- Get live Item states while hovering over item names in the Editor
|
||||
- Show human readable `Thread::sleep()` times while hovering
|
||||
|
||||
![openHAB2 code snippets](docs/images/openhab-demo.gif)
|
||||
|
||||
|
|
|
@ -75,11 +75,9 @@ export class HoverProvider {
|
|||
let match: number = parseInt(hoveredLine.match(HoverProvider.THREAD_SLEEP_REGEX)[0])
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
let resultText = new MarkdownString();
|
||||
|
||||
resultText.appendMarkdown(`##### Sleep Time`)
|
||||
let resultText = new MarkdownString();
|
||||
resultText.appendCodeblock(`${this.humanReadableDuration(match)}`, 'openhab')
|
||||
resultText.appendText(`\n\n`)
|
||||
|
||||
resolve(new Hover(resultText))
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue