@@ -14,7 +14,7 @@ module.exports = {
1414 this . markup = tagToken . args . trim ( )
1515 } ,
1616
17- async render ( context ) {
17+ async render ( scope ) {
1818 // obfuscate first legit space, remove all other spaces, then restore legit space
1919 // this way we can support spaces=NUMBER as well as spaces = NUMBER
2020 const input = this . markup
@@ -30,7 +30,7 @@ module.exports = {
3030 assert ( parseInt ( numSpaces ) || numSpaces === '0' , '"spaces=NUMBER" must include a number' )
3131
3232 // Get the referenced value from the context
33- const value = await this . liquid . evalValue ( `site.data.${ dataReference } ` , context )
33+ const value = await this . liquid . evalValue ( `site.data.${ dataReference } ` , scope )
3434
3535 // If nothing is found in the context, exit with nothing; this may
3636 // feel weird and that we should throw an error, but this is "The Liquid Way TM"
@@ -39,6 +39,6 @@ module.exports = {
3939 // add spaces to each line
4040 const renderedReferenceWithIndent = value . replace ( / ^ / mg, ' ' . repeat ( numSpaces ) )
4141
42- return this . liquid . parseAndRender ( renderedReferenceWithIndent , context )
42+ return this . liquid . parseAndRender ( renderedReferenceWithIndent , scope . environments )
4343 }
4444}
0 commit comments