From 5c47b7c9f5f0309caef45ea54113bf09ec1b79f9 Mon Sep 17 00:00:00 2001 From: H2Sxxa Date: Sun, 21 Jul 2024 14:17:15 +0800 Subject: [PATCH] fix attribute with comma --- flutter_ffi_plugin/bin/src/message.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flutter_ffi_plugin/bin/src/message.dart b/flutter_ffi_plugin/bin/src/message.dart index 2fca5cba..e8201b5f 100644 --- a/flutter_ffi_plugin/bin/src/message.dart +++ b/flutter_ffi_plugin/bin/src/message.dart @@ -800,11 +800,12 @@ Future>>> analyzeMarkedMessages( markType = MarkType.rustSignalBinary; } + // find [RINF:RUST-ATTRIBUTE(...)] var attr = attrExp.stringMatch(statement); if (attr != null) { markedMessages[subPath]![filename]!.add(MarkedMessage( MarkType.rustAttribute, - "--prost_opt=type_attribute=$filename.$messageName=$attr", + "--prost_opt=type_attribute=$filename.$messageName=${attr.replaceAll(",", "\\,")}", -1, )); continue;