Improve markdown presentation (#245)

Signed-off-by: Jerome Luckenbach <github@luckenba.ch>
pull/253/head
Jerome Luckenbach 2021-03-19 10:00:36 +01:00 committed by GitHub
parent 9daa771c1d
commit ad81ff13f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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)

View File

@ -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))
})