This commit is contained in:
Adria Navarro 2024-02-22 00:26:18 +01:00
parent af3c4285f0
commit d24ea36c64
3 changed files with 4 additions and 4 deletions

View File

@ -105,7 +105,7 @@ export async function processObject(object, context, opts?) {
export async function processString(
string: string,
context: object,
opts?: { noHelpers: boolean }
opts?: { noHelpers?: boolean; escapeNewlines?: boolean }
) {
// TODO: carry out any async calls before carrying out async call
return processStringSync(string, context, opts)
@ -367,7 +367,7 @@ export function doesContainString(template, string) {
export function convertToJS(hbs) {
const blocks = findHBSBlocks(hbs)
let js = "return `",
prevBlock = null
prevBlock: string | null = null
const variables = {}
if (blocks.length === 0) {
js += hbs

View File

@ -1,4 +1,4 @@
const { processString } = require("../src/index.js")
import { processString } from "../src/index"
describe("Handling context properties with spaces in their name", () => {
it("should allow through literal specifiers", async () => {

View File

@ -1,4 +1,4 @@
const { convertToJS } = require("../src/index.js")
import { convertToJS } from "../src/index"
function checkLines(response, lines) {
const toCheck = response.split("\n")