Skip to content

MultiSpan does not fullfill documented API interface #1790

@loilo

Description

@loilo

The MultiSpan introduced in Sass 1.54.0 does not provide access to the properties documented for SourceSpan. Although it looks like the properties should be accessible (I can only take a guess here because I don't know Dart), they are undefined in the JavaScript API.

Minimal Node.js code for reproducing the problem (tested with latest Sass version, 1.54.5):

let sass = require('sass')

sass.compileString(`* > { --foo: bar }`, {
  logger: {
    warn(_message, { span }) {
      // `span.start` should yield a `SourceLocation` according to documentation, gets `undefined` instead
      console.log(span.start)
    }
  }
})

Metadata

Metadata

Assignees

Labels

JavaScriptIssues particular to the Node.js distributionbug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions