Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade message.position to message.place; remove stray console.log #120

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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