Losing comments for <locale>
dmajda opened this issue · 2 comments
dmajda commented
Consider the following YCP code:
{
textdomain "foo";
string s = /* before */ _("bar");
}
When I run ycpc -cx
on it with Y2PARSECOMMENTS=1
, I get the following XML:
<?xml version="1.0" encoding="UTF-8"?>
<ycp version="2.15.8.39280">
<block kind="file">
<symbols>
<symbol global="1" category="filename" type="<unspec>" name="../testcases/units.ycp"/>
<symbol category="variable" type="string" name="s"/>
</symbols>
<statements>
<stmt><textdomain name="foo" comment_before=" 
 "/></stmt>
<stmt><assign name="s" comment_before=" 

 " comment_after="
"><locale domain="foo" text="bar"/></assign></stmt>
</statements>
</block>
</ycp>
The XML does not contain the /* before */
comment.
The minimal testcase comes form String.ycp.
dmajda commented
JFYI I verified the fix works with yast2-core-2.24.12-3.1.x86_64.