Skip to content

Commit fc797cf

Browse files
vassudanaguntajgm
authored andcommitted
Remove superfluous push to delimiter stack in handleDelim
A clause in the condition gating whether to add a parsed ' or " to the delimiter stack *always* evaluated to TRUE. What is clearly a typo happened to not break any tests and *probably* only wasted a bit of memory and CPU. This commit reflects what I believe to be the original intention: Only add ' and " if smart quotes is enabled.
1 parent 98c25ab commit fc797cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/inlines.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ var handleDelim = function(cc, block) {
329329
// Add entry to stack for this opener
330330
if (
331331
(res.can_open || res.can_close) &&
332-
(this.options.smart || cc !== C_SINGLEQUOTE || cc !== C_DOUBLEQUOTE)
332+
(this.options.smart || (cc !== C_SINGLEQUOTE && cc !== C_DOUBLEQUOTE))
333333
) {
334334
this.delimiters = {
335335
cc: cc,

0 commit comments

Comments
 (0)