创建属性时存在标识符<context>
和标签的错误,可能也是标签。<language>
id=
<style>
参见stackexchange
下面的原型测试套件是在这个环境中运行的:
linuxuser@ubuntu:~$ gedit -V
gedit - Version 3.28.1
linuxuser@ubuntu:~$ uname -a
Linux ubuntu 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:00 UTC 2019 i686 i686 i686 GNU/Linux
linuxuser@ubuntu:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic
演示此失败的测试套件语言文件:
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
special mods for extended background highlighting and comments MJS aka etx 2021
id (mandatory)
Identifier for the description.
This is used for external references and must be unique among language descriptions.
It can contain a string of letters, digits, hyphens ("-") and underscores ("_"). NOT!!!
as follows for id attribute of both tags language & context
empirical evidence gathered via simultaneously changing both id's to be identical
fails reliably: xRef
fail unreliably: x-ref X_-ef3
but aOk: xref xref3 x-ref3
-->
<language id="xRef" name="C..C xref augment cpp" version="2.0" _section="other">
<definitions>
<context id="special-multiline-comment" style-ref="def:note" > <!-- hi-liter -->
<start>/(\* .. .. .. \*)+/</start>
<end>\%{0@start}</end>
</context>
<!--Main context-->
<context class="no-spell-check" id="xRef" >
<include>
<context ref="special-multiline-comment"/> <!-- override MUST precede to supercede -->
<!-- actual language definition: editing hi lite stuff plus everything from C++ -->
<context ref="cpp:cpp"/>
</include>
</context>
</definitions>
</language>