-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix incorrect tag completion in code block #341
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
Fix incorrect tag completion in code block #341
Conversation
@@ -14,7 +14,8 @@ function decodeHTMLEntities (text) { | |||
['apos', '\''], | |||
['amp', '&'], | |||
['lt', '<'], | |||
['gt', '>'] | |||
['gt', '>'], | |||
['#63', '?'] | |||
] | |||
|
|||
for (var i = 0, max = entities.length; i < max; ++i) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This for
loop must be refactored.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because when & is encoded, it affect other encodes due to they use &
const decodedText = htmlTextHelper.decodeEntities(encodedText) | ||
t.is(decodedText, testCase, 'Integration test through encodedText() and decodedText()') | ||
}) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are good JavaScript Engineer 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
o~ |
fantastic👍 |
I'm running 0.11.12 and get this issue again. Is there an option checkbox I need to tick or has the fix been broken with later updates? EDIT: Noticed it only happen when enabling dangerous HTML tags. |
Finally, I fixed this problem which is reported by #333 and #294.
Before, this code didn't work well in CodeBlock:
<port protcol="tcp" port="10022"/>
before
after