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(
|
export async function processString(
|
||||||
string: string,
|
string: string,
|
||||||
context: object,
|
context: object,
|
||||||
opts?: { noHelpers: boolean }
|
opts?: { noHelpers?: boolean; escapeNewlines?: boolean }
|
||||||
) {
|
) {
|
||||||
// TODO: carry out any async calls before carrying out async call
|
// TODO: carry out any async calls before carrying out async call
|
||||||
return processStringSync(string, context, opts)
|
return processStringSync(string, context, opts)
|
||||||
|
@ -367,7 +367,7 @@ export function doesContainString(template, string) {
|
||||||
export function convertToJS(hbs) {
|
export function convertToJS(hbs) {
|
||||||
const blocks = findHBSBlocks(hbs)
|
const blocks = findHBSBlocks(hbs)
|
||||||
let js = "return `",
|
let js = "return `",
|
||||||
prevBlock = null
|
prevBlock: string | null = null
|
||||||
const variables = {}
|
const variables = {}
|
||||||
if (blocks.length === 0) {
|
if (blocks.length === 0) {
|
||||||
js += hbs
|
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", () => {
|
describe("Handling context properties with spaces in their name", () => {
|
||||||
it("should allow through literal specifiers", async () => {
|
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) {
|
function checkLines(response, lines) {
|
||||||
const toCheck = response.split("\n")
|
const toCheck = response.split("\n")
|
||||||
|
|
Loading…
Reference in New Issue