I am working with Hexo - a nodeJS based static blogging CMS, I am extending the hexo API to register a new block tag called tabblock, see here:
hexo.extend.tag.register('tabblock', function (args, content) {
var tabNumber = NumberOfTabs(content);
var isTabbed = (tabNumber !== 0);
console.log("Args: " + content);
// Where my proper logic should go
result = '<h1> TAG </h1>';
return result;
}, { ends: true });
This is the source snippet I am trying to interpret:
{% tabblock %}
``` JavaScript
console.log("Double Tap");
```
``` TypeScript
console.log("Double Tap");
```
{% endtabblock %}
However, the console.log from the function which should be processing that source, outputs this:
Args: <!--0--> <!--1-->
??? I Assume this is because the code is being interpreted as code rather than content? So if I wrap the {% tabblock %} in {% raw %} tags then I get no output at all, however, if I put the raw tags inside the tabblock, then I get this output:
Args: {% raw
How can I get my desired content?