You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using Octave's plot() function, fields like title() don't work if declared after the plot() command, but do in Octave.
Software Version
Windows 11 23H2, Execute Code v2.0.0, Obsidian v1.7.7.
To Reproduce
Steps to reproduce the behavior:
Run the following code:
x =-10:0.1:10;
figureholdon
plot (x, sin(x));
title('title');
holdoff
Observe the difference compared to (declaring the title field before the plot command):
x =-10:0.1:10;
figureholdon
title('title');
plot (x, sin(x));
holdoff
Expected behavior
Adds "title" text above the plot
Screenshots
The bugged output
The correct output
Additional context
I'm assuming this stems from grabbing the figure as soon as the plot command is executed instead of waiting for the hold off signal.
Running sequential plot commands seems to support this theory. The only graph that should display is the second one.
x =-10:0.1:10;
figureholdon
title('title');
plot(x, sin(x));
plot(x, cos(x));
holdoff
The text was updated successfully, but these errors were encountered:
Good news! I've (tentatively) found a fix, by changing the regex for octave to "hold off" (previously the plot command). I did this by directly editing main.js in my obsidian plugins folder, but editing src/transforms/Magic.ts should work too. var OCTAVE_PLOT_REGEX = /^hold off/gm;
Describe the bug
When using Octave's plot() function, fields like title() don't work if declared after the plot() command, but do in Octave.
Software Version
Windows 11 23H2, Execute Code v2.0.0, Obsidian v1.7.7.
To Reproduce
Steps to reproduce the behavior:
Run the following code:
Observe the difference compared to (declaring the title field before the plot command):
Expected behavior
Adds "title" text above the plot
Screenshots
The bugged output
The correct output
Additional context
I'm assuming this stems from grabbing the figure as soon as the plot command is executed instead of waiting for the hold off signal.
Running sequential plot commands seems to support this theory. The only graph that should display is the second one.
The text was updated successfully, but these errors were encountered: