[Bug] Plugin breaks diff highlighting in reading view
Closed this issue · 6 comments
Take this diff
codeblock:
```diff
@@ -1 +1,2 @@
-print('hello world')
+for i in range(10):
+ print('hello world')
```
It displays correctly in edit mode:
But only the first added line is green when in reading mode:
If I disable the plugin then it displays as expected in the reading view:
I'm using the Things theme, but I tried using the default theme and that didn't change anything. Disabling line numbers didn't help either.
Thank you for creating this plugin-- I really like it!
I will look at it. Thanks for the sample code block
I'm having the same problem:
Here is the same content in reading view:
However disabling the plugin and then re enabling it hides all the content T had modified in reading view. I have to go into edit mode. Cut all the content and repaste and then it shows up with the same issue as shown above; however, I decided to remove the hl:3 from the code block since it wasn't working so the code block looks like this now:
But when I switch back to reading mode:
Voila!
Yea i have no idea why. I don't have many plugins enabled just one or two and this is the only one that provides any level of visual enhancement. If it helps your troubleshooting i have included my current settings for the plugin below:
data.json
I'm using a Theme marked as (Legacy) called Tokyo Night... not sure if that has anything to do with it... Hope this information helps you figure it out.
I'm having the same problem: Here is the same content in reading view:
However disabling the plugin and then re enabling it hides all the content T had modified in reading view. I have to go into edit mode. Cut all the content and repaste and then it shows up with the same issue as shown above; however, I decided to remove the hl:3 from the code block since it wasn't working so the code block looks like this now:
But when I switch back to reading mode: Voila!
Yea i have no idea why. I don't have many plugins enabled just one or two and this is the only one that provides any level of visual enhancement. If it helps your troubleshooting i have included my current settings for the plugin below: data.json
I'm using a Theme marked as (Legacy) called Tokyo Night... not sure if that has anything to do with it... Hope this information helps you figure it out.
Yeah, the info definitely helps to debug. Can you please send the code block as well, so I can reproduce it exactly? This might actually be two problems. I will look at it, what could be the problem.
These are two code blocks I attempted to highlight...
FXMLLoader loader = new FXMLLoader(getClass().getResource("/Views/NextScreen.fxml"));
Parent root = loader.load();
Stage stage = (Stage) ((Button) event.getSource()).getScene().getWindow();
stage.setScene(new Scene(root));
stage.show();
FXMLLoader loader = new FXMLLoader(getClass().getResource("/Views/NextScreen.fxml"));
Parent root = loader.load();
Stage stage = (Stage) ((Button) event.getSource()).getScene().getWindow();
Utility.rememberPosition(stage);
stage.setScene(new Scene(root));
Utility.centerScreen(stage);
stage.setTitle("Appointment Scheduler");
stage.show();
Just a heads up i played around with the problem a little more and was able to get it to display correctly without having to disable and re-enable to plugin.
What i ended up doing was I selected everything in the code block and cut it to clipboard leaving the just the java block and line settings like this:
Then I switch back to reading mode so the code block looks like this:
Then I switch back into edit mode and replace the code i had cut to clipboard, and when I switch back to reading mode it looks the way it should!
So the issue seems to have something to do with refreshing the view maybe? Hope this helps.
This is fixed now. It will be available in the next release.
Fixed in current release (1.2.6). Should there be any problems please report back.