py-lua-parser icon indicating copy to clipboard operation
py-lua-parser copied to clipboard

Comments with Chinese characters are discarded

Open tony-song opened this issue 1 year ago • 0 comments

Dear maintainers,

When using the parser, I find that sometimes comments with Chinese characters are silently discarded. Below is Lua code which can be used to reproduce the error:

   function setupRichText()
        richText.fitArea = false	-- 是否根据内容自适应高度
        richText.fitPerHeight = nil	-- 自适应的单行高度
        return richText
    end

After parsing the code above using ast.parse(), the 2nd comment ('-- 自适应的单行高度') cannot be found anywhere in the returned AST. However the 1st comment can be found in the AST as expected.

Would you please check if there is something wrong when processing comments in Chinese?

tony-song avatar Mar 31 '23 11:03 tony-song