Skip to content

Bold+Strikethrough nested pattern (**~~text~~**) not working in browser automation #26

Description

@drillan

Description

When using browser automation (note_create_draft), nested markdown patterns like **~~text~~** do not render correctly. The bold markers remain as literal text instead of being converted to <strong> tags.

Current Behavior

Input: **~~text~~**
Result: **<s>text</s>** (literal ** text around strikethrough)

Expected Behavior

Input: **~~text~~**
Result: <strong><s>text</s></strong>

Root Cause

The _type_with_strikethrough() function in typing_helpers.py splits text by strikethrough pattern:

parts = _STRIKETHROUGH_PATTERN.split(text)  # "**~~text~~**" → ['**', 'text', '**']

This causes:

  1. ** typed as normal text (not converted by ProseMirror)
  2. ~~text~~ + SPACE triggers strikethrough conversion
  3. ** typed as normal text

Workarounds

  • Apply bold and strikethrough separately
  • Manually apply bold in the browser editor after creation

Technical Notes

  • This is NOT a ProseMirror limitation
  • ProseMirror can handle nested patterns when typed correctly
  • The issue is in how we split and process the text

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions