jgm/skylighting

Pandoc does not correctly highlight reserved keywords in TypeScript code blocks (Markdown).

atalaminos opened this issue · 2 comments

Reserved keywords such as return or const are not highlighted when the file is converted to epub. In JavaScript blocks the highlighting is correct.

const add = (n1: number, n2: number) => {
  return n1 + n2;
}

Imagen de Portapapeles

Thanks

jgm commented

typescript.xml is supposed to import JavaScript keywords; this may not be working properly.

        <!-- Include all JavaScript keywords! -->
        <list name="controlflow">
                <include>controlflow##JavaScript</include>
                <item>goto</item>
        </list>
        <list name="keywords">
                <include>keywords##JavaScript</include>
        </list>
        <list name="reserved">
                <include>reserved##JavaScript</include>
                <item>type</item>
                <item>arguments</item>
                <!-- Class -->
                <item>declare</item> <!-- storage modifier -->
                <item>readonly</item>
                <item>abstract</item>
                <item>constructor</item>
                <item>get</item>
                <item>set</item>
                <!-- Also:
                     public, protected, private, async, super, new, static -->
        </list>
jgm commented

Ah, this is a dup of #124 I guess!