build
This commit is contained in:
parent
fd5ac5898c
commit
8ce9986479
4 changed files with 5 additions and 10 deletions
|
|
@ -605,13 +605,11 @@ Pattern.prototype.bootstrap = () => {
|
|||
return bootstrapped;
|
||||
};
|
||||
function withLocationOffset(pat, offset) {
|
||||
let startLine;
|
||||
return pat.fmap((value) => {
|
||||
value = typeof value === "object" && !Array.isArray(value) ? value : {value};
|
||||
let locations = value.locations || [];
|
||||
startLine = startLine || locations[0].start.line;
|
||||
locations = locations.map(({start, end}) => {
|
||||
const colOffset = startLine === end.line ? offset.start.column : 0;
|
||||
const colOffset = start.line === 1 ? offset.start.column : 0;
|
||||
return {
|
||||
start: {
|
||||
...start,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue