Skip to content

Fix Issue #293: Disable intra-word emphasis by default#295

Merged
schuyler merged 2 commits into
mainfrom
claude/resolve-issue-293-r81df
Feb 4, 2026
Merged

Fix Issue #293: Disable intra-word emphasis by default#295
schuyler merged 2 commits into
mainfrom
claude/resolve-issue-293-r81df

Conversation

@schuyler

@schuyler schuyler commented Feb 4, 2026

Copy link
Copy Markdown
Owner

Summary

Filenames with underscores (e.g., File_Name_With_Underscores.md) were being partially italicized in the preview pane because the extensionIntraEmphasis preference defaulted to YES, allowing Hoedown to interpret underscores as emphasis markers.

This PR:

  • Changes the extensionIntraEmphasis default from YES to NO
  • Refactors existing boolean migration flags into a version-based system for better maintainability
  • Adds migration version 3 to apply the fix to all existing users automatically

Related Issue

Related to #293

Changes

MPPreferences.m

MPPreferencesTests.m

  • Added 10 new tests for version-based migration system and intra-emphasis fix
  • Updated 4 existing checkbox tests to work with the new version-based system

Manual Testing Plan

  1. Fresh Installation: Clear preferences and launch - underscores in filenames should render literally
  2. Existing User Upgrade: Simulate version 2 user - migration should disable intra-emphasis automatically
  3. User Override: Enable "Intra-word emphasis" in Preferences > Markdown - setting should persist

Test content:

- File_Name_With_Underscores.md → should NOT be italicized
- _emphasized_ (with spaces) → SHOULD be italicized

Review Notes

  • Groucho (Architect): Recommended version-based migration pattern
  • Zeppo (Testing): Validated TDD tests and provided manual testing plan
  • Chico (Code Review): Approved with no critical issues

Filenames with underscores (e.g., File_Name_With_Underscores.md) were being
partially italicized because the extensionIntraEmphasis preference defaulted
to YES, allowing Hoedown to interpret underscores as emphasis markers.

Changes:
- Change extensionIntraEmphasis default from YES to NO in loadDefaultPreferences
- Refactor existing boolean migration flags into a version-based system:
  - Version 1: Substitution defaults fix (Issue #263)
  - Version 2: Task list default fix (Issue #269)
  - Version 3: Intra-emphasis default fix (Issue #293)
- Add effectiveMigrationVersion method to infer version from legacy flags
- Add comprehensive tests for the migration system

The migration ensures all users (new and existing) get the fix automatically.
Users who prefer intra-word emphasis can re-enable it in Preferences > Markdown.

Related to #293

https://claude.ai/code/session_018KTdsSojt6tBo9PLmU3Nsi
Update the checkbox/task list migration tests (Issue #269) to work with the
new version-based migration system. The tests now also save/restore and
set/clear MPMigrationVersion to properly simulate fresh installs and
migrated users.

Related to #293

https://claude.ai/code/session_018KTdsSojt6tBo9PLmU3Nsi
@github-actions

github-actions Bot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Report

Current Coverage: 54.02%

Coverage Details (Summary)
Name                                                                                                                                   Coverage            
-------------------------------------------------------------------------------------------------------------------------------------- ------------------- 
MASPreferences.bundle                                                                                                                  0.00% (0/0)         
MacDown 3000.app                                                                                                                       59.69% (7811/13086) 
    /Users/runner/work/macdown3000/macdown3000/MacDown/Code/Document/MPDocument.m                                                      56.96% (1043/1831)  
        MPEditorPreferenceKeyWithValueKey                                                                                              85.71% (6/7)        
        MPEditorKeysToObserve                                                                                                          100.00% (15/15)     
        __MPEditorKeysToObserve_block_invoke                                                                                           100.00% (10/10)     
        MPEditorPreferencesToObserve                                                                                                   100.00% (13/13)     
        __MPEditorPreferencesToObserve_block_invoke                                                                                    100.00% (8/8)       
        MPRectStringForAutosaveName                                                                                                    100.00% (6/6)       
        MPAreNilableStringsEqual                                                                                                       100.00% (3/3)       
        MPGetWebViewBackgroundColor                                                                                                    0.00% (0/9)         
        -[NSURL(Convert) absoluteBaseURLString]                                                                                        0.00% (0/6)         
        -[WebView(Shortcut) enclosingScrollView]                                                                                       100.00% (3/3)       
        -[MPPreferences(Hoedown) extensionFlags]                                                                                       78.57% (22/28)      
        -[MPPreferences(Hoedown) rendererFlags]                                                                                        75.00% (9/12)       
        MPGetPreviewLoadingCompletionHandler                                                                                           100.00% (26/26)     
        __MPGetPreviewLoadingCompletionHandler_block_invoke                                                                            100.00% (23/23)     
        -[MPDocument preferences]                                                                                                      100.00% (3/3)       
        -[MPDocument markdown]                                                                                                         100.00% (3/3)       
        -[MPDocument setMarkdown:]                                                                                                     100.00% (3/3)       
        -[MPDocument html]                                                                                                             0.00% (0/3)         
        -[MPDocument toolbarVisible]                                                                                                   0.00% (0/3)         
        -[MPDocument previewVisible]                                                                                                   100.00% (3/3)       
        -[MPDocument editorVisible]                                                                                                    100.00% (3/3)       
        -[MPDocument needsHtml]                                                                                                        80.00% (4/5)        
        -[MPDocument setTotalWords:]                                                                                                   0.00% (0/7)         
        -[MPDocument setTotalCharacters:]                                                                                              0.00% (0/7)         
        -[MPDocument setTotalCharactersNoSpaces:]                                                                                      0.00% (0/8)         
        -[MPDocument setAutosaveName:]                                                                                                 100.00% (4/4)       
        -[MPDocument init]                                                                                                             90.00% (9/10)       
        -[MPDocument windowNibName]                                                                                                    100.00% (3/3)       
        -[MPDocument windowControllerDidLoadNib:]                                                                                      100.00% (90/90)     
        __41-[MPDocument windowControllerDidLoadNib:]_block_invoke                                                                     100.00% (4/4)       
        -[MPDocument reloadFromLoadedString]                                                                                           100.00% (8/8)       
        -[MPDocument close]                                                                                                            17.39% (4/23)       
        +[MPDocument autosavesInPlace]                                                                                                 100.00% (2/2)       
        +[MPDocument writableTypes]                                                                                                    100.00% (3/3)       
        -[MPDocument isDocumentEdited]                                                                                                 100.00% (5/5)       
        -[MPDocument writeToURL:ofType:error:]                                                                                         0.00% (0/15)        
        -[MPDocument dataOfType:error:]                                                                                                100.00% (3/3)       
        -[MPDocument readFromData:ofType:error:]                                                                                       100.00% (8/8)       
        -[MPDocument prepareSavePanel:]                                                                                                76.92% (30/39)      
        __31-[MPDocument prepareSavePanel:]_block_invoke                                                                               100.00% (12/12)     
        -[MPDocument printInfo]                                                                                                        0.00% (0/12)        
        -[MPDocument printOperationWithSettings:error:]                                                                                0.00% (0/7)         
        -[MPDocument printDocumentWithSettings:showPrintPanel:delegate:didPrintSelector:contextInfo:]                                  0.00% (0/24)        
        __93-[MPDocument printDocumentWithSettings:showPrintPanel:delegate:didPrintSelector:contextInfo:]_block_invoke                 0.00% (0/17)        
        -[MPDocument validateUserInterfaceItem:]                                                                                       0.00% (0/41)        

... (2573 more lines truncated)

📊 **Full coverage report available in workflow artifacts**

@schuyler schuyler merged commit 2d72bae into main Feb 4, 2026
9 checks passed
@schuyler schuyler deleted the claude/resolve-issue-293-r81df branch February 4, 2026 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants