Note composer > ‘Extract this heading’ should not extract final newline(s)

Steps to reproduce

The situation seems more or less identical to this bug report, hence I re-used its title — but for some reason it’s happening again. It wasn’t happening to me until only just recently. It was happening to me earlier in 1.13.x…but I only got around to reporting it now unfortunately!

It’s happening now all the time in my vault. I also reproduced it in the sandbox vault. Particularly it happens when there’s no extra line betwen sections, e.g.,

## Official Help Site
Check out the complete [Obsidian documentation](https://help.obsidian.md/) online, available in multiple languages.
## What is this place?

Did you read and follow the Troubleshooting Guide ? Yes

Expected result

[[Official Help Site]]

What is this place?

Actual result

[[Official Help Site]]## What is this place?

Environment

SYSTEM INFO:
Obsidian version: 1.13.7
Installer version: 1.8.9
Operating system: Darwin Kernel Version 25.5.0: Mon Apr 27 20:41:19 PDT 2026; root:xnu-12377.121.6~2/RELEASE_ARM64_T8122 25.5.0
Login status: not logged in
Language: en
Insider build toggle: off
Live preview: on
Base theme: light
Community theme: none
Snippets enabled: 3
Restricted mode: off
Plugins installed: 31
Plugins enabled: 23
1: Templater v2.24.3
2: Better Export PDF v2.0.3
3: Citations v0.4.5
4: Footnote Shortcut v0.1.3
5: Highlightr v1.2.2
6: Pane Relief v0.5.9
7: Recent Files v1.7.10
8: Quiet Outline v0.5.17
9: Quick Explorer v0.2.18
10: RTL Support v2.0.1
11: Tag Wrangler v0.6.4
12: Shortcuts extender v3.0.0
13: Vimrc Support v0.10.2
14: Excalidraw v2.25.3
15: Image Converter v1.4.5
16: Linter v1.32.0
17: Style Settings v1.0.9
18: QuickAdd v2.21.0
19: Maps v0.2.2
20: Image Context Menus v1.13.0
21: Dataview v0.5.68
22: Omnisearch v1.30.1
23: Various Complements v11.4.0

Thanks in advance!

thanks

Fixed for the next build.

Thank you!!