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

HTML spaces removed completely on line endings #16

Closed
nigelboor opened this issue Jan 10, 2020 · 8 comments
Closed

HTML spaces removed completely on line endings #16

nigelboor opened this issue Jan 10, 2020 · 8 comments
Assignees

Comments

@nigelboor
Copy link

When minifying HTML file some of the words are combined.

Eg:
This...


                                                    <p>The role will involve working within Gloucestershire&rsquo;s
                                                        countywide Continuing Health Care Team. You will be
                                                        completing CHC assessments and taking a vital role in the
                                                        multi-disciplinary team to complete the Decision Support
                                                        Tool (DST). This will include making decisions around
                                                        eligibility of a primary health need. You will work with
                                                        colleagues within the CHC team to ensure that a seamless
                                                        service is provided to all individuals who may become
                                                        eligible for CHC, have become ineligible for CHC or are CHC
                                                        funded. You will be involved in supporting the development
                                                        of partnership CHC practice by sharing CHC information with
                                                        locality champions for cascading to locality staff under the
                                                        direction of the CHC operational lead.</p>

Is minified to...


The role will involve working within Gloucestershire’scountywide Continuing Health Care Team. You will becompleting CHC assessments and taking a vital role in themulti-disciplinary team to complete the Decision SupportTool (DST). This will include making decisions aroundeligibility of a primary health need. You will work withcolleagues within the CHC team to ensure that a seamlessservice is provided to all individuals who may becomeeligible for CHC, have become ineligible for CHC or are CHCfunded. You will be involved in supporting the developmentof partnership CHC practice by sharing CHC information withlocality champions for cascading to locality staff under thedirection of the CHC operational lead.


VSCode is set to use spaces for indenting

@Josee9988 Josee9988 self-assigned this Jan 10, 2020
@Josee9988 Josee9988 added the bug label Jan 10, 2020
@Josee9988
Copy link
Owner

Hi @nigelboor , when I minify your code this is what it gives me:

<p>The role will involve working within Gloucestershire&rsquo;scountywide Continuing Health Care Team. You will becompleting CHC assessments and taking a vital role in themulti-disciplinary team to complete the Decision SupportTool (DST). This will include making decisions aroundeligibility of a primary health need. You will work withcolleagues within the CHC team to ensure that a seamlessservice is provided to all individuals who may becomeeligible for CHC, have become ineligible for CHC or are CHCfunded. You will be involved in supporting the developmentof partnership CHC practice by sharing CHC information withlocality champions for cascading to locality staff under thedirection of the CHC operational lead.</p>

I see the issue, and I'll try to fix this as soon as possible, thanks for letting me know!

@Josee9988
Copy link
Owner

Hey, I've found there is not an existent issue in the spaces, but it is giving some bugs because your text is separated in multiple lines, and the extension tries to avoid multiple lines by removing them and creating just one line.
If I let a space when we found a linebreak it will create multiple spaces between HTML labels and also within words.

The problem occurs because for example, the result:

locality champions for cascading to locality staff under the
                                                        direction

will give

thedirection

because after the it literally finds a linebreak and not space, so the extension could not imagine that this linebreak is a space, so it is not an extension bug, it is a problem with the code you gave, that is comprehensible for you but it is not for the extension.

To sum up all the mess I said, the extension detects spaces correctly but can not understand if linebreaks mean a space to you, this could be solved by adding a space after the word you want to have space, even if there is a linebreak after it.

Thanks for the interest!

@Josee9988 Josee9988 added Not a bug and removed bug labels Jan 10, 2020
@nigelboor
Copy link
Author

nigelboor commented Jan 10, 2020 via email

@Josee9988
Copy link
Owner

I'll take a deeper look in how to handle it. Stay tuned.

Josee9988 added a commit that referenced this issue Jan 10, 2020
@Josee9988 Josee9988 added bug and removed Not a bug labels Jan 10, 2020
@Josee9988
Copy link
Owner

It is fixed in the new version 2.1.1.
Download it and test it out, if there is any other problem or the original one wasn't solved as you expected to, feel free to keep posting issues or simply telling me.

Thanks for trying to make this extension better, your help is highly appreciated!

@nigelboor
Copy link
Author

nigelboor commented Jan 10, 2020 via email

@Josee9988
Copy link
Owner

Ow, you are completely right, but I'm afraid to say this won't be fixed anytime soon, because I'm doing it with regex and there is no way to distinct if the "> " that I'm looking is from a strong label or not. 😪

@nigelboor
Copy link
Author

nigelboor commented Jan 11, 2020 via email

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

No branches or pull requests

2 participants