PublicLab.Editor
PublicLab.Editor copied to clipboard
Errors in the "incorrect bold tags" detection
Looks like this gets tripped sometimes when it may be more annoying than helpful. Let's dig up the original use case and figure out how we can limit this to where it's really useful, or rethink it?
I've seen the issue and pull request that introduced this solution before, i should probably search it out, and look into making the needed adjustment.
I think simply stripping off the extra bold tags without having to show the error message would be okay.
I've been able to do that. But I'm thinking this error could be fixed in Woofmark instead, I think fixing the bold-ing error issue with fix this equally, or maybe with some extra tweaks.
@Shulammite-Aso the bolding issues that I've went through so far were in rich text mode, and the source was possibly the function wrapping
which is a part of rich text mode, whereas this one is in mardown mode. Your approach seems right but we'll have to check where the changes have to be made.
@jywarren can you tell what were you trying to do here so that we know what the ideal behaviour should be?
@Shulammite-Aso the bolding issues that I've went through so far were in rich text mode, and the source was possibly the function
wrapping
which is a part of rich text mode, whereas this one is in mardown mode.
Yeah @shreyaa-s the extra bold tags often become a problem in the markdown mode, but I think the tags are actually being inserted in the rich text mode, but you don't see it until it is parsed to markdown.
Here #162 is the issue that documented the buggy behavior before the "bold tag detecting fix was introduced"
However the fix does not really remove the bold tags, it only alerts the user so that they remove the tags manually. And the error message doesn't leave even after the tags has been removed.
I think the goal should be to just slice out the extra bold tags. I was able to correct this locally to an extent, but the last time it was also removing some bold tags that are needed (maybe a problem with my regex).
But I started to think fixing the bold-ing error will equally fix this like I mentioned earlier. Because the reason I think that is happening in the first place is because you currently can't unselected bold formatting, and hitting enter (I noticed hitting it twice after using bold) inserts a new pair of tags.