Skip to content

Commit

Permalink
Workaround mdformat HTML removal by moving them at the end of last fo…
Browse files Browse the repository at this point in the history
  • Loading branch information
kdeldycke committed Nov 20, 2024
1 parent b7c50ee commit a5fcf65
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions meta_package_manager/inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,9 @@ def update_readme() -> None:
readme,
footnotes,
"<!-- operation-footnotes-start -->\n\n",
# XXX mdformat-footnote is stripping all HTML comments after footnotes:
# mdformat-footnote is stripping all HTML comments after footnotes:
# https://github.com/executablebooks/mdformat-footnote/issues/11
# So we can't protect the content with an end tag here. This is dangerous, as
# it could lead to content loss if the footnotes are not already properly
# positioned at the end of the file.
# "\n\n<!-- operation-footnotes-end -->",
None,
# So we protect the content to be replaced with an end tag that we put at the
# tail of the last footnote line, without any carriage return.
"<!-- operation-footnotes-end -->\n",
)
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,4 +304,4 @@ Other subcommands and options are documented in:

[^linux]: Linux: ALT Linux, Amazon Linux, Android, Arch Linux, Buildroot, CentOS, CloudLinux OS, Debian, Exherbo Linux, Fedora, Gentoo Linux, Guix System, IBM PowerKVM, KVM for IBM z Systems, Linux Mint, Mageia, Mandriva Linux, openSUSE, Oracle Linux, Parallels, Pidora, Raspbian, RedHat Enterprise Linux, Rocky Linux, Scientific Linux, Slackware, SUSE Linux Enterprise Server, Tuxedo OS, Ubuntu, Unknown Linux, Windows Subsystem for Linux v1, Windows Subsystem for Linux v2, XenServer.

[^unix]: Unix: Cygwin, GNU/Hurd, IBM AIX, Solaris.
[^unix]: Unix: Cygwin, GNU/Hurd, IBM AIX, Solaris.<!-- operation-footnotes-end -->

0 comments on commit a5fcf65

Please sign in to comment.