Skip to content

Commit

Permalink
Correctly include short version in markdown.html
Browse files Browse the repository at this point in the history
  • Loading branch information
Witiko committed Jun 16, 2024
1 parent a55a3c6 commit b534a0b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ ifeq ($(NO_DOCUMENTATION), true)
endif

VERSION=$(shell git describe --tags --always --long --exclude latest)
SHORT_VERSION=$(shell git describe --tags --always --long --exclude latest | sed 's/-.*//')
SHORTVERSION=$(shell git describe --tags --always --long --exclude latest | sed 's/-.*//')
LASTMODIFIED=$(shell git log -1 --date=format:%Y-%m-%d --format=%ad)

ifndef DOCKER_TEXLIVE_TAG
Expand Down Expand Up @@ -125,8 +125,8 @@ $(EXTRACTABLES): $(INSTALLER) $(DTXARCHIVE)
luatex $<
sed -i \
-e 's#(((VERSION)))#$(VERSION)#g' \
-e 's#(((SHORTVERSION)))#$(SHORTVERSION)#g' \
-e 's#(((LASTMODIFIED)))#$(LASTMODIFIED)#g' \
-e 's#(((SHORT_VERSION)))#$(SHORT_VERSION)#g' \
$(INSTALLABLES)
sed -i \
-e '/\\ExplSyntaxOff/{N;/\\ExplSyntaxOn/d;}' \
Expand Down Expand Up @@ -177,6 +177,7 @@ markdown-transcluded.md: markdown.md markdown-interfaces.md markdown-options.md

%.html: %-transcluded.md %.css
sed -e 's#\\markdownVersion{}#$(VERSION)#g' \
-e 's#\\markdownShortVersion{}#$(SHORTVERSION)#g' \
-e 's#\\markdownLastModified{}#$(LASTMODIFIED)#g' \
-e 's#\\TeX{}#<span class="tex">T<sub>e</sub>X</span>#g' \
-e 's#\\LaTeX{}#<span class="latex">L<sup>a</sup>T<sub>e</sub>X</span>#g' \
Expand Down
4 changes: 2 additions & 2 deletions markdown.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -969,14 +969,14 @@ If Markdown is not included in your \TeX{} distribution, you will need to
install it.

From [Releases][], download [an archive `markdown.zip` for this version of the
Markdown package ((((SHORT_VERSION))))][this-release] or a different version
Markdown package (\markdownShortVersion{})][this-release] or a different version
that you wish to install. Then, unzip the archive. If you downloaded a
different version of the Markdown package, you should now locate a file named
`markdown.html` with the user manual for that version, open it and follow the
installation steps in it rather than the steps from this manual.

[releases]: https://github.com/witiko/markdown/releases (Releases - witiko/markdown)
[this-release]: https://github.com/Witiko/markdown/releases/download/(((SHORT_VERSION)))/markdown.zip
[this-release]: https://github.com/witiko/markdown/releases/download/\markdownShortVersion{}/markdown.zip (Release \markdownShortVersion{} - witiko/markdown)

Alternatively, download the package from the repository using Git, enter the
directory named `markdown` and run the `make base` command using GNU Make:
Expand Down

0 comments on commit b534a0b

Please sign in to comment.