md2drupal.sh test page for syntax highlighting on drupal.org

Created on 23 February 2024, 10 months ago
Updated 29 April 2024, 8 months ago
```js
const languages = Object.keys(Prism.languages)
  .filter(k => !['extend','insertBefore','DFS'].includes(k));
```
const languages = Object.keys(Prism.languages)
  .filter(k => !['extend','insertBefore','DFS'].includes(k));
```javascript
const languages = Object.keys(Prism.languages)
  .filter(k => !['extend','insertBefore','DFS'].includes(k));
let aliases = {};
let tmpId = 999;
languages.forEach(k => {
  const id = Prism.languages[k].__id || ++tmpId;
  if (!aliases[id]) aliases[id] = [];
  aliases[id].push(k);
});
console.log(Object.values(aliases));
```
const languages = Object.keys(Prism.languages)
  .filter(k => !['extend','insertBefore','DFS'].includes(k));
let aliases = {};
let tmpId = 999;
languages.forEach(k => {
  const id = Prism.languages[k].__id || ++tmpId;
  if (!aliases[id]) aliases[id] = [];
  aliases[id].push(k);
});
console.log(Object.values(aliases));
```json
[
  [
    "css"
  ],
  [
    "clike"
  ],
  [
    "markup",
    "xml",
    "html",
    "mathml",
    "svg"
  ],
  [
    "javascript",
    "js"
  ],
  [
    "apacheconf"
  ],
  [
    "bash"
  ],
  [
    "diff"
  ],
  [
    "git"
  ],
  [
    "ini"
  ],
  [
    "json",
    "jsonp"
  ],
  [
    "less"
  ],
  [
    "nginx"
  ],
  [
    "php"
  ],
  [
    "sass"
  ],
  [
    "scss"
  ],
  [
    "sql"
  ],
  [
    "twig"
  ],
  [
    "yaml"
  ]
]
```
[
  [
    "css"
  ],
  [
    "clike"
  ],
  [
    "markup",
    "xml",
    "html",
    "mathml",
    "svg"
  ],
  [
    "javascript",
    "js"
  ],
  [
    "apacheconf"
  ],
  [
    "bash"
  ],
  [
    "diff"
  ],
  [
    "git"
  ],
  [
    "ini"
  ],
  [
    "json",
    "jsonp"
  ],
  [
    "less"
  ],
  [
    "nginx"
  ],
  [
    "php"
  ],
  [
    "sass"
  ],
  [
    "scss"
  ],
  [
    "sql"
  ],
  [
    "twig"
  ],
  [
    "yaml"
  ]
]
```diff
- old
+ new
```
- old
+ new
```bash
$ ./md2drupal.sh drupal_prism.md > drupal_prism.html
$ ls
automate-release.html  drupal_prism.html  input.html  markdown_strict.html                          md2drupal.sh
automate-release.md    drupal_prism.md    input.md    markdown to drupal forum issue conversion.md  syntax.md
```
$ ./md2drupal.sh drupal_prism.md > drupal_prism.html
$ ls
automate-release.html  drupal_prism.html  input.html  markdown_strict.html                          md2drupal.sh
automate-release.md    drupal_prism.md    input.md    markdown to drupal forum issue conversion.md  syntax.md
```html
<p>Hello world.</p>
```
<p>Hello world.</p>
```twig
{{ dump() }}
<p>Hello {{ user.name }}.</p>
{% if user.active %}
<button>{{ 'deactivate'|t }}</button>
{% endif %}
```
{{ dump() }}
<p>Hello {{ user.name }}.</p>
{% if user.active %}
<button>{{ 'deactivate'|t }}</button>
{% endif %}
```sql
SELECT * FROM config WHERE name LIKE "%contact%"
```
SELECT * FROM config WHERE name LIKE "%contact%"
💬 Support request
Status

Closed: outdated

Version

0.0

Component

User interface

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024