Hello,
I have an article with code snippet in “pseudocode”, like this:
```pseudocode
// Product interface
interface Document {
method open()
method close()
method save()
}
```
I want it to be itercepted and internally implemented via Chrome Java Lexer, temporarily, until I find solution (such as creating custom lexer).
Unfortunately, we do not have aliases
option in configuration, like this:
markup:
goldmark:
renderer:
unsafe: true
highlight:
noClasses: false
lineNos: true
lineNumbersInTable: false
guessSyntax: false
aliases:
pseudocode: java
Would be nice to add “aliases” feature…
Another option is to intercept it like this:
layouts
_default
_markup
```
{{- /* Custom render hook for code blocks */ -}}
{{- $language := .Language | default "plaintext" -}}
{{- if eq $language "pseudocode" -}}
{{- $language = "java" -}}
{{- end -}}
<pre><code class="language-{{ $language | urlize }}">
{{- .Inner | htmlEscape | safeHTML }}
</code></pre>
```
But it didn’t work…
I hope I don’t have XYProblem here anyway, I have text files with ````pseudocode` in it, which I want to map internally to Java highlighter (for example). Thanks,