Skip to content

Commit

Permalink
Merge pull request #120 from oscarlevin/cleanup
Browse files Browse the repository at this point in the history
Upgrade message.position to message.place; remove stray console.log
  • Loading branch information
siefkenj authored Nov 5, 2024
2 parents 63ccc59 + 608df48 commit 487183d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions packages/unified-latex-to-pretext/libs/author-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function gatherAuthorInfo(ast: Ast.Ast, file: VFile): AuthorInfo[] {
const message = createVFileMessage(node);
file.message(
message,
message.position,
message.place,
"latex-to-pretext:warning"
)
}
Expand Down Expand Up @@ -71,7 +71,7 @@ function createVFileMessage(node: Ast.Macro): VFileMessage {
if (node.position) {
message.line = node.position.start.line;
message.column = node.position.start.column;
message.position = {
message.place = {
start: {
line: node.position.start.line,
column: node.position.start.column,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function factory(
`Warning: There is no equivalent tag for \"${macro.content}\", \"${tag}\" was used as a replacement.`,
"macro-subs"
);
file.message(message, message.position, message.source);
file.message(message, message.place, message.source);
}

// Assume the meaningful argument is the last argument. This
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function emptyStringWithWarningFactory(
);
file.message(
message,
message.position,
message.place,
`unified-latex-to-pretext:macro-subs`
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export const unifiedLatexToPretextLike: Plugin<
for (const warningMessage of warningMessages.messages) {
file.message(
warningMessage,
warningMessage.position,
warningMessage.place,
"unified-latex-to-pretext:break-on-boundaries"
);
}
Expand Down Expand Up @@ -163,7 +163,7 @@ export const unifiedLatexToPretextLike: Plugin<
for (const warningMessage of unsupportedByKatex.messages) {
file.message(
warningMessage,
warningMessage.position,
warningMessage.place,
"unified-latex-to-pretext:report-unsupported-macro-katex"
);
}
Expand Down Expand Up @@ -194,7 +194,6 @@ export const unifiedLatexToPretextLike: Plugin<

// Make sure we are actually mutating the current tree.
originalTree.content = tree.content;
console.log(file.messages);
};
};

Expand Down

0 comments on commit 487183d

Please sign in to comment.