We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c603e2e commit e35ed32Copy full SHA for e35ed32
lib/SubInput.js
@@ -27,6 +27,7 @@ module.exports = class SubInput {
27
columnInContext = column + this.columnInContext - 1;
28
} else {
29
lineInContext = this.lineInContext + line - 1;
30
+ columnInContext = column;
31
}
32
33
return this.context.error(message, lineInContext, columnInContext, opts);
lib/index.js
@@ -42,6 +42,8 @@ function positionAfter(node, chunks) {
42
43
module.exports = {
44
parse(css, options) {
45
+ if (!options) options = {};
46
+
47
let input;
48
if (options.context) {
49
if (!options.lineInContext || !options.columnInContext) {
lib/nodes/Func.js
@@ -86,7 +86,12 @@ class Func extends Container {
86
// use a new parser to parse the params of the function. recursion here makes for easier maint
87
// we must require this here due to circular dependency resolution
88
const { parse } = require('../'); // eslint-disable-line global-require
89
- const root = parse(params, opts);
+ const root = parse(params, {
90
+ ...opts,
91
+ context: parser.input,
92
+ lineInContext: brackets[2],
93
+ columnInContext: brackets[3] + 1
94
+ });
95
const { nodes: children } = root;
96
97
// TODO: correct line and character position (should we just pad the input? probably easiest)
lib/nodes/Interpolation.js
@@ -66,7 +66,12 @@ class Interpolation extends Container {
66
67
68
69
- const { nodes: children } = parse(params, parser.options);
+ const { nodes: children } = parse(params, {
70
+ ...parser.options,
71
72
+ lineInContext: first[2],
73
+ columnInContext: first[3] + first[1].length + 1
74
75
76
77
for (const child of children) {
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments