diff --git a/automation_tools/appdata_management.sh b/automation_tools/appdata_management.sh
index 29fa7cf5..a59fdfb9 100755
--- a/automation_tools/appdata_management.sh
+++ b/automation_tools/appdata_management.sh
@@ -58,61 +58,25 @@ version_number="${version_number%% -*}" # Remove text after " - "
# Extract sections from the latest version notes
sections=$(echo "$latest_version_notes" | awk '/##/ { print; }')
-# # Create a formatted section list
-# section_list=""
-# current_section=""
-# while IFS= read -r line; do
-# if [[ "$line" == "##"* ]]; then
-# if [ -n "$current_section" ]; then
-# section_list+=""
-# fi
-# section_name="${line##*# }"
-# section_list+="
${section_name}
"
-# elif [[ "$line" == "- "* ]]; then
-# entry="${line#*- }"
-# section_list+="- ${entry}
"
-# fi
-# done <<< "$sections"
-
-# if [ -n "$current_section" ]; then
-# section_list+="
"
-# fi
-
-altered_sections=""
+# Create a formatted section list
+section_list=""
current_section=""
-in_list=0
-
-IFS=$'\n'
-for line in $sections; do
- if [[ $line =~ ^##\ (.+) ]]; then
+while IFS= read -r line; do
+ if [[ "$line" == "##"* ]]; then
if [ -n "$current_section" ]; then
- if [ $in_list -eq 1 ]; then
- altered_sections+="\n"
- in_list=0
- fi
- altered_sections+="\n"
- fi
- current_section="${BASH_REMATCH[1]}"
- altered_sections+="$current_section
\n\n"
- elif [[ $line =~ ^-\ (.+) ]]; then
- if [ $in_list -eq 0 ]; then
- in_list=1
- altered_sections+="\n"
- fi
- list_item="${BASH_REMATCH[1]}"
- altered_sections+="- $list_item
\n"
- elif [ -z "$line" ]; then
- if [ $in_list -eq 1 ]; then
- in_list=0
- altered_sections+="
\n"
+ section_list+="
"
fi
+ section_name="${line##*# }"
+ section_list+="${section_name}
"
+ elif [[ "$line" == "- "* ]]; then
+ entry="${line#*- }"
+ section_list+="- ${entry}
"
fi
-done
-if [ $in_list -eq 1 ]; then
- altered_sections+="
\n"
-fi
+done <<< "$sections"
-echo -e "$altered_sections"
+if [ -n "$current_section" ]; then
+ section_list+=""
+fi
# Replace RELEASE_NOTES_PLACEHOLDER with the actual release notes
release_description="${release_snippet/RELEASE_NOTES_PLACEHOLDER/$section_list}"