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

omit empty span tags in the output #2182

Merged
merged 4 commits into from Oct 13, 2019
Merged

Conversation

nknapp
Copy link
Contributor

@nknapp nknapp commented Oct 12, 2019

No description provided.

src/highlight.js Outdated Show resolved Hide resolved
@nknapp
Copy link
Contributor Author

nknapp commented Oct 12, 2019

I moved the other if-statement to the top of the method because the rest of the method does not need to be executed if not className is set.

@joshgoebel
Copy link
Member

I moved the other if-statement to the top of the method because the rest of the method does not need to be executed if not className is set.

Yeah I saw that the other day but wasn't worth a PR on it's own. Good catch.

@joshgoebel
Copy link
Member

@egor-rogov Unless you see some reason we should leave these empty tags around this seems pretty clear cut to me.

@joshgoebel joshgoebel added the enhancement An enhancement or new feature label Oct 12, 2019
@joshgoebel joshgoebel added this to the 9.15.11 milestone Oct 12, 2019
@joshgoebel joshgoebel changed the title fix(highlight.js): omit empty <span>-tags in the output omit empty <span>-tags in the output Oct 12, 2019
@joshgoebel joshgoebel changed the title omit empty <span>-tags in the output omit empty span tags in the output Oct 12, 2019
@joshgoebel
Copy link
Member

joshgoebel commented Oct 13, 2019

@nknapp Can you update the changelog, please? Was there some easy way for me to get to it thru the UI? I couldn't find one.

@nknapp
Copy link
Contributor Author

nknapp commented Oct 13, 2019

#2175 as well?

@joshgoebel
Copy link
Member

Yes, we should always try to remember to update the changelog. :-)

@joshgoebel joshgoebel merged commit 52d1212 into highlightjs:master Oct 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature parser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants