Set header_style to 'atx' in the options

Created on 12 March 2025, about 1 month ago

Problem/Motivation

By default the html-to-markdown library outputs H1 as double underlined, H2 as single underlined, and H3 and following in the usual ### Title notation. This is a curious choice and contravenes most current use of Markdown by techwriters. It would be cleaner and better aligned with current MD use to output all headings with hashes preceding the title text.

Steps to reproduce

Request any node with one of the currently supported methods.
Note output style.

Proposed resolution

Set header_style to 'atx' in the options instead to output all headings with hashes preceding the title text.
https://github.com/thephpleague/html-to-markdown?tab=readme-ov-file#styl...
$converter = new HtmlConverter(array('header_style'=>'atx'));

Remaining tasks

Change the output options to include atx header choice.

User interface changes

none

API changes

none

Data model changes

none

πŸ“Œ Task
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States christophweber

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024