1
0
Fork 0
mirror of synced 2024-10-01 09:38:55 +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)}> <li on:click={() => addToText(helper.text)}>
<div> <div>
<Label extraSmall>{helper.displayText}</Label> <Label extraSmall>{helper.displayText}</Label>
{@html helper.description} <div class="description">{@html helper.description}</div>
</div> </div>
</li> </li>
{/each} {/each}
@ -192,4 +192,16 @@
color: var(--red); color: var(--red);
text-decoration: underline; 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> </style>

View file

@ -107,6 +107,6 @@ describe("check manifest", () => {
it("should be able to retrieve the manifest", () => { it("should be able to retrieve the manifest", () => {
const manifest = getManifest() const manifest = getManifest()
expect(manifest.math).not.toBeNull() 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 () => { it("should allow use of the date helper with now time", async () => {
const date = new Date() const date = new Date()
const output = await processString("{{ date now 'DD' }}", {}) const output = await processString("{{ date now 'DD' }}", {})
expect(output).toBe(date.getDate().toString()) expect(parseInt(output)).toBe(date.getDate())
}) })
}) })