System Javascript.lang context "template-string" causes error when referencing

After updating from Gtk+3 version 3.18.9 to 3.24.20 I found out that the syntax highlighting in my SourceView didn’t work properly for javascript code (other languages were ok).
In my custom markdown-extra2.lang I have the following syntax:

<context id="code-block-js" end-at-line-end="false" style-inside="true">
      <start>^```language-javascript[ \t]*$</start>
      <end>^```$</end>

      <include>
      	<context sub-pattern="0" where="start" style-ref="language-code-block"/>
      	<context sub-pattern="0" where="end" style-ref="language-code-block"/>
        <context ref="js:js"/>
      </include>
</context>

I analyzed the diff (with Meld) between the two versions of the javascript.lang files and found that a new context with id template-string has been added. Commenting out that context definition solved the problem. So it’s not compatible with my code-block-js context.

Javascript.lang system file (/usr/share/…):

<context id="template-string" style-ref="string">
      <start>`</start>
      <end>`</end>
      <include>
        <context id="template-expression" style-ref="function">
          <start>\$\{</start>
          <end>\}</end>
        </context>
      </include>
</context>

I I don’t comment out the template-string context in the javascript.lang file, then the end of my context (which is ```) is not recognized.

Can anyone tell me how to modify my context definition in order to play nicely along with the default javascript.lang file?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.