number-headings-obsidian
number-headings-obsidian copied to clipboard
Allow Numbering Prefix
My use case are legal documents.
For example:
# § 1 Heading
## § 1.1 ...
So basically I want to prepend a § to all headings.
Interesting idea... I'll look into it!
Yes please!
I have quite a similar issue, I want to prepend a value to the headings with a dot, as I separate my complete document in different sub-documents with the title of the sub-document defining a chapter later on.
So it would be
---
number-headings: auto, start-at 2, max 3, prependValue 5
---
# 5.2 Heading 1
## 5.2.1 Subheading
I tried to solve it here for me, but could not find the update line to avoid an update loop once a Symbol such as § triggers a whitespace in my example. @onlyafly : Could you tell me where to find the updating? Then I would try to change it and make a pull request if it helps.
https://github.com/onlyafly/number-headings-obsidian/compare/master...michaelsx:number-headings-obsidian:issue-42
Missed to update the regex, should be solved now here, at least what I understood as desired result and what I wanted myself as result: https://github.com/onlyafly/number-headings-obsidian/commit/dab634812c550dfeb89c737cef383240b3663916
For testing you can use the BRAT-Plug in a new vaults
[!warning] Do not test in productive vaults as errors can occur!
here some inputs:
---
number headings: auto, start-at 2, max 3, prependValue 5
------
# Heading 1
# Heading 2
---
number headings: auto, max 3, prependValue §
---
# Heading 1
# Heading 2
## Subheading