Configuration Guide

Learn how to customize makeHTML's conversion behavior using the config.json file.

Config Location

~/Library/Application Support/makeHTML/config.json

You can quickly access this folder using the "Open Config Folder" button in the app.

Replacement Mode

"replacements_mode": "aggressive"

Controls how replacements interact with hyperlinks from the DOCX file:

  • aggressive - Config replacements override DOCX hyperlinks. If both exist for the same text, the config replacement wins.
  • safe - DOCX hyperlinks are preserved. Replacements will not apply to text that's already hyperlinked in the DOCX.

Output Settings

"output": {
  "paragraph_tag": "p",
  "heading_tag": "h3"
}

paragraph_tag - HTML tag to use for regular paragraphs (typically p)

heading_tag - HTML tag to use for detected headings (e.g., h1, h2, h3)

Replacements

"replacements": [
  {
    "search": "©",
    "wrap_tag": "sup"
  },
  {
    "search": "ACME Corp",
    "replace": "<a href=\"https://example.com\">ACME Corp</a>",
    "case_sensitive": true,
    "enabled": false
  },
  {
    "search": "TODO",
    "wrap_tag": "mark",
    "case_sensitive": false,
    "enabled": false
  }
]

Search and replace rules applied to the HTML output. Each replacement can have:

  • search - Text to find (can be plain text or Unicode characters like \u00a9 for ©)
  • replace - HTML to replace with (can include tags)
  • wrap_tag - Alternative to replace - wraps the found text in an HTML tag (e.g., sup, strong, mark)
  • case_sensitive - Whether the search is case-sensitive (default: false)
  • enabled - Whether this replacement is active (default: true)
Note: Use either replace or wrap_tag, not both.

Quote Detection

"quote_detection": {
  "enabled": true,
  "threshold": 3,
  "wrap_open": "<div class=\"blockquote\"><p>",
  "wrap_close": "</p></div>",
  "quote_types": ["\"", "\u201C", "\u201D"]
}

Automatically detects paragraphs with many quotation marks and wraps them in special HTML.

  • enabled - Turn quote detection on/off
  • threshold - Minimum number of quote characters needed to trigger detection
  • wrap_open - HTML to insert before the quote paragraph
  • wrap_close - HTML to insert after the quote paragraph
  • quote_types - Which characters count as quotes

Code Snippets

"code_snippets": [
  {
    "name": "Photo grid 3x1",
    "file": "snippets/photo-grid-3x1.html",
    "enabled": false
  }
]

Predefined HTML snippets you can insert into your documents.

  • name - Display name for the snippet
  • file - Path to the HTML file (relative to the Application Support folder)
  • enabled - Whether the snippet appears in the menu

Heading Detection

"heading_detection": {
  "enabled": true,
  "max_length": 50
}

Automatically converts short, bold paragraphs to headings.

  • enabled - Turn heading detection on/off
  • max_length - Maximum character length for a paragraph to be considered a heading

Tidy Formatting

"tidy_formatting": {
  "enabled": true,
  "indent_spaces": 2,
  "wrap_length": 80,
  "vertical_space": true,
  "show_body_only": true,
  "custom_options": ["--indent-attributes", "yes", "--break-before-br", "yes"]
}

Controls HTML formatting using the HTML Tidy library.

  • enabled - Turn tidy formatting on/off
  • indent_spaces - Number of spaces for indentation
  • wrap_length - Maximum line length before wrapping
  • vertical_space - Add blank lines between elements for readability
  • show_body_only - Output only the HTML body content (no <html>, <head>, etc.)
  • custom_options - Additional Tidy options (see Tidy documentation)

Regex Replacements

"regex_replacements": [
  {
    "pattern": "@([A-Za-z0-9_]+)",
    "replace": "<a target=\"_blank\" href=\"https://x.com/$1\">@$1</a>",
    "case_sensitive": true,
    "enabled": false,
    "description": "Convert @handles to X/Twitter links"
  },
  {
    "pattern": "\\b(\\d{3})-(\\d{3})-(\\d{4})\\b",
    "replace": "<a href=\"tel:$1$2$3\">$1-$2-$3</a>",
    "case_sensitive": false,
    "enabled": false,
    "description": "Convert phone numbers to tel: links"
  }
]

Advanced pattern matching using regular expressions. Runs after standard replacements.

  • pattern - Regular expression pattern to match (use \\ for backslashes in JSON)
  • replace - Replacement string - use $1, $2, etc. for capture groups
  • case_sensitive - Whether the pattern match is case-sensitive (default: true)
  • enabled - Whether this replacement is active (default: true)
  • description - Optional documentation explaining what the pattern does
Note: Invalid regex patterns are silently skipped. Test complex patterns before adding them.

Common patterns:

  • @([A-Za-z0-9_]+) - Matches @handles like @username
  • \\b(\\d{3})-(\\d{3})-(\\d{4})\\b - Matches US phone numbers like 555-123-4567
  • #([A-Za-z0-9_]+) - Matches hashtags like #topic