mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
ui: change highlight style
This commit is contained in:
1 parent
6440720656
commit
a89d8bfde8
5 files changed
+59
-82
No files matched your search
@@ -108,6 +108,7 @@ const prismjsApiWrap = {
|
||||
if (format && astyle && astyle[1]) {
|
||||
const [success, result] = format($code.text(), `${UserContext.astyleOptions.trim()} mode=${astyle[1]}`);
|
||||
console.log(success.result);
|
||||
code.original = $code.text();
|
||||
if (!success) Notification.error('Code format fail');
|
||||
else $code.text(result.replace(/^#(include|import)[\t ]*(<|")/gm, (match, p1, p2) => `#${p1} ${p2}`));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user