Skip to content

HTTP: Fixed body not being highlighted#2734

Merged
RunDevelopment merged 1 commit intoPrismJS:masterfrom
RunDevelopment:http-2733
Feb 7, 2021
Merged

HTTP: Fixed body not being highlighted#2734
RunDevelopment merged 1 commit intoPrismJS:masterfrom
RunDevelopment:http-2733

Conversation

@RunDevelopment
Copy link
Copy Markdown
Member

This fixes #2733.

In #2597, I changed HTTP to fix some polynomial backtracking and accidentally introduced this bug. I replaced a [\s\S]* with a .* thinking that it wouldn't make a difference in that specific pattern but I was wrong.

The fix is to allow a single line break after each non-empty line. This will prevent polynomial backtracking and should behave correctly.

@github-actions
Copy link
Copy Markdown

JS File Size Changes (gzipped)

A total of 1 files have changed, with a combined diff of +9 B (+1.4%).

Details
file master pull size diff % diff
components/prism-http.min.js 651 B 660 B +9 B +1.4%

Generated by 🚫 dangerJS against 3db6542

@RunDevelopment RunDevelopment merged commit 1dfc827 into PrismJS:master Feb 7, 2021
@RunDevelopment RunDevelopment deleted the http-2733 branch February 7, 2021 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

http language not highlighting body

1 participant