This update enhances the Markdown heading correction function by ensuring that # symbols within code blocks are ignored. Previously, the script would add an extra # to correct heading levels but also affected lines within code blocks, causing unintended modifications.
Key Changes:
Added detection to ignore lines within code blocks (delimited by ```).
Updated fix_md_headings to skip lines in code blocks while correcting Markdown heading levels outside of them.
This update enhances the Markdown heading correction function by ensuring that
#
symbols within code blocks are ignored. Previously, the script would add an extra#
to correct heading levels but also affected lines within code blocks, causing unintended modifications.Key Changes:
fix_md_headings
to skip lines in code blocks while correcting Markdown heading levels outside of them.