1
0
Fork 0
mirror of synced 2024-10-01 01:28:51 +13:00

Merge branch 'feature/handlebars-helpers' of github.com:Budibase/budibase into feature/handlebars-helpers

This commit is contained in:
Martin McKeaveney 2021-02-01 14:30:02 +00:00
commit 6725f820a4
3 changed files with 15 additions and 3 deletions

View file

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

View file

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

View file

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