Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StringUtils: Trimming leading and trailing white-spaces when chomping "all" #390

Closed
wants to merge 1 commit into from

Conversation

AlexanderInova
Copy link

Fixes an issue which produces invalid formatting of emphasis and strong emphasis when the HTML element contains leading or trailing white-spaces, which is not allowed within markdown (see https://spec.commonmark.org/0.31.2/#example-351).

Related to #388

…mping "all".

Fixes an issue which produces invalid formatting of emphasis and strong emphasis when the HTML element contains leading or trailing white-spaces, which is not allowed within markdown (see https://spec.commonmark.org/0.31.2/#example-351).

Related to #388
@mysticmind
Copy link
Owner

mysticmind commented May 4, 2024

@AlexanderInova There is a tricky use case i.e. html text example html <i>code </i>block as per our unit test, this is failing. What do you expect as the markdown for this case? example html *code *block or example html *code* block?

There is more to this as a fix, looking into it.

@AlexanderInova AlexanderInova marked this pull request as draft May 4, 2024 10:52
@AlexanderInova
Copy link
Author

@mysticmind Yes, I had a feeling that just simply extending this method would solve all issues. :)

What do you expect as the markdown for this case? example html *code *block or example html code block?

The basic expectation should be: "valid mark-down". Your second example looks fine to me.

There is more to this a a fix, looking into it.

Thank you very much. I will try to get deeper into this at monday.

@mysticmind
Copy link
Owner

I have got a neat fix which solves the issue for all emphasizes, will push the change do a release. I am closing this PR.

@mysticmind mysticmind closed this May 4, 2024
@mysticmind
Copy link
Owner

@AlexanderInova I have added fixes and released 4.4.0. Please check.

@AlexanderInova
Copy link
Author

@mysticmind We updated to 4.4.0 and it looks very good now. Our quality assurance will have a deeper look on the results monday. I will give you the final feedback within the original issue (#388).

Thank you very much.
We very much appreciate your help, as well as your whole work on this library. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants