Fixes
This commit is contained in:
parent
af3c4285f0
commit
d24ea36c64
|
@ -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
|
||||
|
|
|
@ -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 () => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const { convertToJS } = require("../src/index.js")
|
||||
import { convertToJS } from "../src/index"
|
||||
|
||||
function checkLines(response, lines) {
|
||||
const toCheck = response.split("\n")
|
||||
|
|
Loading…
Reference in New Issue