Skip to content

Commit

Permalink
Better latex handling
Browse files Browse the repository at this point in the history
  • Loading branch information
sabeechen committed Apr 15, 2024
1 parent 0c49316 commit 2cdf7b4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion server/static/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion server/sw.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ts/controls/chat-message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ export class ChatMessage extends LitElement {
}

// latext blocks can also start with "/[" and end with "/]". Replace those with seintinals too.
const latexBlocks2 = messageText.match(/\\\[\n([\s\S]*?)\n\\\]/g);
const latexBlocks2 = messageText.match(/\\\[(.*?)\\\]/g);
if (latexBlocks2) {
for (const block of latexBlocks2) {
const latex = block.substring(3, block.length - 3);
Expand Down

0 comments on commit 2cdf7b4

Please sign in to comment.