Merge branch 'feature/handlebars-helpers' of github.com:Budibase/budibase into feature/handlebars-helpers
This commit is contained in:
commit
6725f820a4
|
@ -101,7 +101,7 @@
|
|||
<li on:click={() => addToText(helper.text)}>
|
||||
<div>
|
||||
<Label extraSmall>{helper.displayText}</Label>
|
||||
{@html helper.description}
|
||||
<div class="description">{@html helper.description}</div>
|
||||
</div>
|
||||
</li>
|
||||
{/each}
|
||||
|
@ -192,4 +192,16 @@
|
|||
color: var(--red);
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.description :global(p) {
|
||||
color: var(--grey-7);
|
||||
}
|
||||
|
||||
.description :global(p:hover) {
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
.description :global(p a) {
|
||||
color: var(--grey-7);
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -107,6 +107,6 @@ describe("check manifest", () => {
|
|||
it("should be able to retrieve the manifest", () => {
|
||||
const manifest = getManifest()
|
||||
expect(manifest.math).not.toBeNull()
|
||||
expect(manifest.math.abs.description).toBe("Return the magnitude of `a`.")
|
||||
expect(manifest.math.abs.description).toBe("<p>Return the magnitude of <code>a</code>.</p>\n")
|
||||
})
|
||||
})
|
|
@ -167,7 +167,7 @@ describe("test the date helpers", () => {
|
|||
it("should allow use of the date helper with now time", async () => {
|
||||
const date = new Date()
|
||||
const output = await processString("{{ date now 'DD' }}", {})
|
||||
expect(output).toBe(date.getDate().toString())
|
||||
expect(parseInt(output)).toBe(date.getDate())
|
||||
})
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue