Skip to content

Commit

Permalink
fix: make int work both ways
Browse files Browse the repository at this point in the history
  • Loading branch information
ocapraro committed Nov 10, 2023
1 parent 9641502 commit d02b6d1
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "obsidian-math-plus",
"name": "Obsidian Math+",
"version": "0.6.0",
"version": "0.6.1",
"minAppVersion": "0.12.0",
"description": "This is an Obsidian plugin for taking math notes using Excalidraw.",
"author": "Oscar Capraro",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "obsidian-math-plus",
"version": "0.6.0",
"version": "0.6.1",
"description": "This is a math plugin for Obsidian (https://obsidian.md)",
"main": "main.js",
"scripts": {
Expand Down
12 changes: 8 additions & 4 deletions parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,15 @@ const handleSuperSubScripts = (str: string): string => {
let match = (singleMatch&&groupMatch)?((singleMatch.index<groupMatch.index)?singleMatch:groupMatch):(singleMatch||groupMatch);
if (singleMatch && match == singleMatch) {
let endex = match.index+match[0].length;
while (str[endex] == "{"){
if (str[endex] == "{"){
endex += closeGroup(str.slice(endex));
}
if ("^_".includes(str[endex+1])){
console.log(str[endex+1]);
endex += 2;
}
if (str[endex] == "{"){
endex += closeGroup(str.slice(endex));
if ("^_".includes(str[endex+1])){
endex += 2;
}
}
if (str[endex]=="\\"){
endex += str.slice(endex+1).match(/[a-z]+/i)[0].length;
Expand Down
3 changes: 2 additions & 1 deletion versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@
"0.4.2": "0.12.0",
"0.5.0": "0.12.0",
"0.5.1": "0.12.0",
"0.6.0": "0.12.0"
"0.6.0": "0.12.0",
"0.6.1": "0.12.0"
}

0 comments on commit d02b6d1

Please sign in to comment.