UNPKG

@phoenix-plugin-registry/brackets-markdown-preview

Version:

Markdown live preview incl. detached window, code syntax highlighting, output themes, adaptive preview width, graphical checkboxes, activation on start...

154 lines (114 loc) 2.64 kB
# "Highlight.js" Tests ## Apache ```apache # rewrite`s rules for wordpress pretty url LoadModule rewrite_module modules/mod_rewrite.so RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . index.php [NC,L] ExpiresActive On ExpiresByType application/x-javascript "access plus 1 days" Order Deny,Allow Allow from All <Location /maps/> RewriteMap map txt:map.txt RewriteMap lower int:tolower RewriteCond %{REQUEST_URI} ^/([^/.]+)\.html$ [NC] RewriteCond ${map:${lower:%1}|NOT_FOUND} !NOT_FOUND RewriteRule .? /index.php?q=${map:${lower:%1}} [NC,L] </Location> ``` ## Markdown ```markdown # hello world you can write text [with links](http://example.com) inline or [link references][1]. * one _thing_ has *em*phasis * two __things__ are **bold** [1]: http://example.com --- hello world =========== <this_is inline="xml"></this_is> > markdown is so cool so are code segments 1. one thing (yeah!) 2. two thing `i can write code`, and `more` wipee! ``` ## C-Sharp ```cs using System; #pragma warning disable 414, 3021 /// <summary>Main task</summary> async Task<int, int> AccessTheWebAsync() { Console.WriteLine("Hello, World!"); string urlContents = await getStringTask; return urlContents.Length; } ``` ## JavaScript ```javascript function $initHighlight(block, cls) { try { if (cls.search(/\bno\-highlight\b/) != -1) return process(block, true, 0x0F) + ` class="${cls}"`; } catch (e) { /* handle exception */ } for (var i = 0 / 2; i < classes.length; i++) { if (checkCondition(classes[i]) === undefined) console.log('undefined'); } } export $initHighlight; ``` ## JSON ```json [ { "title": "apples", "count": [12000, 20000], "description": {"text": "...", "sensitive": false} }, { "title": "oranges", "count": [17500, null], "description": {"text": "...", "sensitive": false} } ] ``` ## Cascading Style Sheet (CSS) ```css @font-face { font-family: Chunkfive; src: url('Chunkfive.otf'); } body, .usertext { color: #F0F0F0; background: #600; font-family: Chunkfive, sans; } @import url(print.css); @media print { a[href^=http]::after { content: attr(href) } } ``` ## HTML, XML ```html <!DOCTYPE html> <title>Title</title> <style>body {width: 500px;}</style> <script type="application/javascript"> function $init() {return true;} </script> <body> <p checked class="title" id='title'>Title</p> <!-- here goes the rest of the page --> </body> ``` --- Source of the code samples: [Highlight.js Demo](https://highlightjs.org/static/demo/) --- END