PublicLab.Editor icon indicating copy to clipboard operation
PublicLab.Editor copied to clipboard

Errors in the "incorrect bold tags" detection

Open jywarren opened this issue 4 years ago • 5 comments

image

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?

jywarren avatar Apr 28 '20 19:04 jywarren

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.

Shulammite-Aso avatar Apr 28 '20 21:04 Shulammite-Aso

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 avatar May 12 '20 08:05 Shulammite-Aso

@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?

shreyaa-s-zz avatar May 19 '20 08:05 shreyaa-s-zz

@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.

Shulammite-Aso avatar May 19 '20 10:05 Shulammite-Aso

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.

Shulammite-Aso avatar May 19 '20 10:05 Shulammite-Aso