Sorting Bases strips leading zeros from property defined as a text field

Steps to reproduce

Sorting by a frontmatter property which is defined as text, but contains only numbers, will have the leading zero (maybe multiple zeros) removed during sorting. The field is still correctly displayed, but the sort order is broken.

Did you read and follow the Troubleshooting Guide ? [Yes]

Expected result

If creating items, in my case, a BoxID property which is a hexadecimal number - but stored as text. 01 should proceed 0A. 03 should also proceed 0A.

Actual result

01 will appear after 0A, as if it is sorted as “1”. 03 will appear after 2F as if it is sorted as “3”.

Environment

SYSTEM INFO:
Obsidian version: 1.13.7
Installer version: 1.13.7
Operating system: #5 SMP PREEMPT_DYNAMIC Sun Mar 29 21:34:09 BST 2026 6.6.130
Login status: not logged in
Language: en-GB
Insider build toggle: off
Live preview: on
Base theme: dark
Community theme: Storm 1.0.0
Snippets enabled: 5
Restricted mode: off
Plugins installed: 10
Plugins enabled: 9
1: Homepage v4.4.4
2: Tag Wrangler v0.6.4
3: Templater v2.20.6
4: TagFolder v0.18.19
5: Commander v0.5.7
6: Tasks v8.3.0
7: Advanced Tables v0.23.2
8: Kanban v2.0.51
9: Links v1.17.51

Distro Name: Fedora
Distro Version: 44
Desktop Environment: Sway
Installation method used: Flatpak


Additional information

A quick workaround is to add this formula and sort by it:

note["your property"].split("")