[GH-ISSUE #4135] [Issue]: Markdown headings create unintended Lorebook Keeper entries #2241

Closed
opened 2026-10-21 05:46:35 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @SpicyMarinara on GitHub (Jul 26, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4135

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Lorebook Keeper interprets Markdown headings inside an existing lorebook entry as new topics. Updating the entry then creates unintended entries named after those headings.

Expected behavior

Lorebook Keeper should preserve Markdown headings within an entry and update only the intended lorebook entry.

Actual behavior

When an entry containing Markdown headings is updated, Lorebook Keeper creates additional lorebook entries from the heading text. For example, headings named "Personality" and "Fishing Info" become separate entries.

Steps to reproduce

  1. Create a Lorebook Keeper entry named "Bob".
  2. Add content containing Markdown headings, such as "# About Bob", "## Personality", and "### Fishing Info".
  3. Have Lorebook Keeper update the "Bob" entry.
  4. Observe that new entries named "Personality" and "Fishing Info" are created.

Environment

  • Marinara Engine version: Not provided
  • Install type: Not provided
  • OS + version: Not provided
  • Browser or app shell: Not provided

Logs, screenshots, or video

No logs, screenshots, or video provided. The Discord report includes a text reproduction example.

Additional context

The reporter initially suspected normal Lorebook Keeper behavior or the Gemma4-E4B model, but identified that the unintended entries consistently correspond to headings from existing entries. A maintainer confirmed that Markdown formatting should not break Lorebook Keeper.

Discord thread: Lorebook Keeper extra entries accidently created
Discord thread link: https://discord.com/channels/1417099416812392641/1530971255493361754
Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653)

Discord thread transcript (3 messages)
[2026-07-26T16:13:11.380Z] AgentX: This has taken me too long to figure out. For weeks/months, I thought it was just how Lorebook Keeper worked or my Gemma4-E4B was messing things up, but I finally saw the actual bug.

In the Lorebook Keeper, it uses "#" to denote keywords and new topic/entries. So if you use "#" in an entry, it will double create the entry.

Example:
` ` `Main Entry named "Bob"
# About Bob
## Personality
Bob likes to fish.
### Fishing Info
Bob hates to eat fish.
` ` `

Then when Lorebook Keeper does an update to "Bob" it breaks and creates a new Lorebook Entry named "Personality" and another Lorebook Entry named "Fishing Info". The hashtags used within Lorebook entries is causing all of the multiple entries to be created. It felt random to me at first until I realized all of unnecessary entries LBK was making were just headers from other entries.

To fix this, we either can't use hashtags in lorebook entries when LBK is active or LBK needs to figure out how to handle hashtags existing in lorebook entries.
[Discord message: https://discord.com/channels/1417099416812392641/1530971255493361754/1530971255493361754]

[2026-07-26T16:35:48.872Z] Marinara: Oh shoot, yeah. Never caught it since I never use Markdown format. :monaks:
[Discord message: https://discord.com/channels/1417099416812392641/1530971255493361754/1530976949227360257]

[2026-07-26T16:36:11.699Z] Marinara: We need to make it so markdown format doesn’t break things.
[Discord message: https://discord.com/channels/1417099416812392641/1530971255493361754/1530977044970606776]

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @SpicyMarinara on GitHub (Jul 26, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4135 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Lorebook Keeper interprets Markdown headings inside an existing lorebook entry as new topics. Updating the entry then creates unintended entries named after those headings. ## Expected behavior Lorebook Keeper should preserve Markdown headings within an entry and update only the intended lorebook entry. ## Actual behavior When an entry containing Markdown headings is updated, Lorebook Keeper creates additional lorebook entries from the heading text. For example, headings named "Personality" and "Fishing Info" become separate entries. ## Steps to reproduce 1. Create a Lorebook Keeper entry named "Bob". 2. Add content containing Markdown headings, such as "# About Bob", "## Personality", and "### Fishing Info". 3. Have Lorebook Keeper update the "Bob" entry. 4. Observe that new entries named "Personality" and "Fishing Info" are created. ## Environment - Marinara Engine version: Not provided - Install type: Not provided - OS + version: Not provided - Browser or app shell: Not provided ## Logs, screenshots, or video No logs, screenshots, or video provided. The Discord report includes a text reproduction example. ## Additional context The reporter initially suspected normal Lorebook Keeper behavior or the Gemma4-E4B model, but identified that the unintended entries consistently correspond to headings from existing entries. A maintainer confirmed that Markdown formatting should not break Lorebook Keeper. Discord thread: Lorebook Keeper extra entries accidently created Discord thread link: https://discord.com/channels/1417099416812392641/1530971255493361754 Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653) <details> <summary>Discord thread transcript (3 messages)</summary> ```text [2026-07-26T16:13:11.380Z] AgentX: This has taken me too long to figure out. For weeks/months, I thought it was just how Lorebook Keeper worked or my Gemma4-E4B was messing things up, but I finally saw the actual bug. In the Lorebook Keeper, it uses "#" to denote keywords and new topic/entries. So if you use "#" in an entry, it will double create the entry. Example: ` ` `Main Entry named "Bob" # About Bob ## Personality Bob likes to fish. ### Fishing Info Bob hates to eat fish. ` ` ` Then when Lorebook Keeper does an update to "Bob" it breaks and creates a new Lorebook Entry named "Personality" and another Lorebook Entry named "Fishing Info". The hashtags used within Lorebook entries is causing all of the multiple entries to be created. It felt random to me at first until I realized all of unnecessary entries LBK was making were just headers from other entries. To fix this, we either can't use hashtags in lorebook entries when LBK is active or LBK needs to figure out how to handle hashtags existing in lorebook entries. [Discord message: https://discord.com/channels/1417099416812392641/1530971255493361754/1530971255493361754] [2026-07-26T16:35:48.872Z] Marinara: Oh shoot, yeah. Never caught it since I never use Markdown format. :monaks: [Discord message: https://discord.com/channels/1417099416812392641/1530971255493361754/1530976949227360257] [2026-07-26T16:36:11.699Z] Marinara: We need to make it so markdown format doesn’t break things. [Discord message: https://discord.com/channels/1417099416812392641/1530971255493361754/1530977044970606776] ``` </details> ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:46:35 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Jul 26, 2026):

Resolved by #4137 and merged into staging.

<!-- gh-comment-id:5084760484 --> @SpicyMarinara commented on GitHub (Jul 26, 2026): Resolved by #4137 and merged into `staging`.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#2241
No description provided.