Skip to content

Commit 71ef6aa

Browse files
committed
support comment preview
1 parent 1e36263 commit 71ef6aa

File tree

1 file changed

+12
-1
lines changed
  • src/main/resources/embedding/assets

1 file changed

+12
-1
lines changed

src/main/resources/embedding/assets/entry.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,18 @@ $(function(){
8989
}catch(e){}
9090
}
9191
}
92-
prettyPrint();
9392
}
93+
94+
// Initial processing
9495
convertLinks();
96+
prettyPrint();
97+
98+
setTimeout(function(){ // Delayed execution
99+
// Create a hook for prettyPrint function to support preview
100+
const original = prettyPrint;
101+
prettyPrint = function(){
102+
convertLinks();
103+
return original.apply(this, arguments);
104+
}
105+
});
95106
})

0 commit comments

Comments
 (0)