-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Upgraded PrismJS to 1.25.0 * Replaced line breaks transoformation according to @mlanin changes in forked repository * Made highest priority for @annotation styles
- Loading branch information
Showing
10 changed files
with
66 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<!doctype html><html lang="en"><head><title>miro-code-highlighter-plugin feedback</title><script src="https://miro.com/app/static/sdk.1.1.js"></script><link rel="stylesheet" href="https://unpkg.com/mirotone/dist/styles.css"/><script src="https://browser.sentry-cdn.com/6.14.0/bundle.min.js" integrity="sha384-1FVbcJ5cSGdCrMNyUndHGSl0WlS+Cq5zaYdfnVF7NqkkQpU+7plvm0NomKbzcD//" crossorigin="anonymous"></script><script>Sentry.init({ | ||
dsn: 'https://[email protected]/1831923', | ||
release: '[email protected].15' | ||
release: '[email protected].16' | ||
});</script></head><body><div class="grid"><div class="cs11 ce12 grid" style="text-align: right"><button class="button-icon" style="width:40px; height: 40px;"></button> <button class="button-icon button-icon-small icon-close" type="button" onclick="miro.board.ui.closeModal();"></button></div><div class="cs2 ce11 form-group"><textarea id="feedback_area" class="textarea" placeholder="Please write your feedback here" rows="4" maxlength="1000"></textarea></div><div class="cs5 ce8"><button class="button button-primary" onclick="sendFeedback()">Send Feedback</button></div></div></body></html><script>function sendFeedback() { | ||
try { | ||
const feedbackText = document.getElementById('feedback_area').value; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<!doctype html><html lang="en"><head><title>miro-code-syntax-highlighter-plugin</title><script src="https://miro.com/app/static/sdk.1.1.js"></script><script src="https://browser.sentry-cdn.com/6.14.0/bundle.min.js" integrity="sha384-1FVbcJ5cSGdCrMNyUndHGSl0WlS+Cq5zaYdfnVF7NqkkQpU+7plvm0NomKbzcD//" crossorigin="anonymous"></script><script>Sentry.init({ | ||
dsn: 'https://[email protected]/1831923', | ||
release: '[email protected].15' | ||
});</script><script src="syntax-highlighter-miro-plugin.js?v0.5.15"></script></head><body><p><b>This is the main miro plugin page.</b> It's useful only within https://miro.com</p></body></html> | ||
release: '[email protected].16' | ||
});</script><script src="syntax-highlighter-miro-plugin.js?v0.5.16"></script></head><body><p><b>This is the main miro plugin page.</b> It's useful only within https://miro.com</p></body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<!doctype html><html lang="en"><head><meta charset="UTF-8"><title>Color Highlighter Settings</title><link rel="stylesheet" href="https://unpkg.com/mirotone/dist/styles.css"/><script src="https://browser.sentry-cdn.com/6.14.0/bundle.min.js" integrity="sha384-1FVbcJ5cSGdCrMNyUndHGSl0WlS+Cq5zaYdfnVF7NqkkQpU+7plvm0NomKbzcD//" crossorigin="anonymous"></script><script>Sentry.init({ | ||
dsn: 'https://[email protected]/1831923', | ||
release: '[email protected].15' | ||
});</script><script src="https://miro.com/app/static/sdk.1.1.js"></script></head><body><div class="grid"><div class="cs2 ce10"><h3 class="h3">Code syntax highlighter Settings</h3></div><div class="cs11 ce12 grid"><button class="button-icon button-icon-small icon-help" type="button" onclick="location.href='feedback.html';"></button> <button class="button-icon button-icon-small icon-close" type="button" onclick="miro.board.ui.closeModal();"></button></div><div class="cs1 ce12" style="height: 10px;"> </div><div class="cs2 ce4">Default language</div><div class="cs5 ce11"><select id="languages" class="select"></select></div><div class="cs2 ce4">Theme</div><div class="cs5 ce11"><select id="themes_select" class="select"></select></div></div></body></html><script src="syntax-highlighter-settings.js?v0.5.15"></script> | ||
release: '[email protected].16' | ||
});</script><script src="https://miro.com/app/static/sdk.1.1.js"></script></head><body><div class="grid"><div class="cs2 ce10"><h3 class="h3">Code syntax highlighter Settings</h3></div><div class="cs11 ce12 grid"><button class="button-icon button-icon-small icon-help" type="button" onclick="location.href='feedback.html';"></button> <button class="button-icon button-icon-small icon-close" type="button" onclick="miro.board.ui.closeModal();"></button></div><div class="cs1 ce12" style="height: 10px;"> </div><div class="cs2 ce4">Default language</div><div class="cs5 ce11"><select id="languages" class="select"></select></div><div class="cs2 ce4">Theme</div><div class="cs5 ce11"><select id="themes_select" class="select"></select></div></div></body></html><script src="syntax-highlighter-settings.js?v0.5.16"></script> |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,43 @@ | ||
import {default as highlighter} from 'code-highlighter/prism' | ||
import {ThemeContext} from "./code-highlighter/prism/themes/interfaces"; | ||
import {themeRegistry} from "./code-highlighter/prism/themes"; | ||
|
||
highlighter.highlight('java', `public class MineSweeper | ||
{\tprivate int[][] myTruth; | ||
\tprivate boolean[][] myShow; | ||
\t | ||
\tpublic void cellPicked(int row, int col) | ||
\t{\tif( inBounds(row, col) && !myShow[row][col] ) | ||
\t\t{\tmyShow[row][col] = true; | ||
\t\t | ||
\t\t\tif( myTruth[row][col] == 0) | ||
\t\t\t{\tfor(int r = -1; r <= 1; r++) | ||
\t\t\t\t\tfor(int c = -1; c <= 1; c++) | ||
\t\t\t\t\t\tcellPicked(row + r, col + c); | ||
\t\t\t}\t | ||
\t\t} | ||
\t} | ||
\t | ||
\tpublic boolean inBounds(int row, int col) | ||
\t{\treturn 0 <= row && row < myTruth.length && 0 <= col && col < myTruth[0].length; | ||
\t} | ||
ThemeContext.getInstance().currentTheme = themeRegistry.getTheme('okaida'); | ||
highlighter.highlight('java', `package org.springframework.boot.actuate.cache; | ||
/** | ||
* test | ||
*/ | ||
@EndpointWebExtension(endpoint = CachesEndpoint.class) | ||
public class CachesEndpointWebExtension { | ||
private final CachesEndpoint delegate; | ||
public CachesEndpointWebExtension(CachesEndpoint delegate) { | ||
this.delegate = delegate; | ||
} | ||
@ReadOperation | ||
public WebEndpointResponse<CacheEntry> cache(@Selector String cache, @Nullable String cacheManager) { | ||
try { | ||
CacheEntry entry = this.delegate.cache(cache, cacheManager); | ||
int status = (entry != null) ? WebEndpointResponse.STATUS_OK : WebEndpointResponse.STATUS_NOT_FOUND; | ||
return new WebEndpointResponse<>(entry, status); | ||
} | ||
catch (NonUniqueCacheException ex) { | ||
return new WebEndpointResponse<>(WebEndpointResponse.STATUS_BAD_REQUEST); | ||
} | ||
} | ||
@DeleteOperation | ||
public WebEndpointResponse<Void> clearCache(@Selector String cache, @Nullable String cacheManager) { | ||
try { | ||
boolean cleared = this.delegate.clearCache(cache, cacheManager); | ||
int status = (cleared ? WebEndpointResponse.STATUS_NO_CONTENT : WebEndpointResponse.STATUS_NOT_FOUND); | ||
return new WebEndpointResponse<>(status); | ||
} | ||
catch (NonUniqueCacheException ex) { | ||
return new WebEndpointResponse<>(WebEndpointResponse.STATUS_BAD_REQUEST); | ||
} | ||
} | ||
}`).then(value => console.log(value)).catch(reason => console.error(reason)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters