Hi, I’ve been trying to create a custom rule in grammar_custom.xml, but it won’t work. It works in grammar.xml, but it doesn’t in grammar_custom.xml. I’d be grateful if anyone tells me what do I miss?
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="../../../../../../../../../languagetool-core/src/main/resources/org/languagetool/rules/print.xsl" ?>
<?xml-stylesheet type="text/css" href="../../../../../../../../../languagetool-core/src/main/resources/org/languagetool/rules/rules.css"
title="Easy editing stylesheet" ?>
<rules lang="en-US" xsi:noNamespaceSchemaLocation="../../../../../../../../../../languagetool-core/src/main/resources/org/languagetool/rules/rules.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<category id="Style" name="Style" type="style">
<!-- English rule, 2022-08-01 -->
<rule id="COMMA_OR_DOT_AFTER_QUOTES" name="Comma or dot after quotes">
<pattern>
<marker>
<token regexp='yes'>(["])</token>
<token regexp='yes'>([.]|[,])</token>
</marker>
</pattern>
<message>Swap <suggestion><match no="2" regexp_match="\1" regexp_replace="$1"/>\1</suggestion> at the end of the sentence!</message>
<short>Swap dot/comma and quotation mark!</short>
<example correction=''>"Hello<marker>".</marker> "Hello", he said.</example>
<example>"Hello<marker>."</marker></example>
<example correction=''>"Hello<marker>",</marker> he said.</example>
<example>"Hello<marker>,"</marker> he said.</example>
</rule>
</category>
</rules>