Skip to content

Commit

Permalink
update h1 title regex
Browse files Browse the repository at this point in the history
  • Loading branch information
kpym committed Jan 26, 2024
1 parent d5f35fb commit 96c4e08
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion HOWTO.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Here is an example of possible `.gitlab-ci.yml`:
pages:
image: alpine
script:
- wget -c https://github.com/kpym/gm/releases/download/v0.17.1/gm_0.17.1_Linux_64bit.tar.gz -O - | tar -C /usr/local/bin -xz gm
- wget -c https://github.com/kpym/gm/releases/download/v0.17.2/gm_0.17.2_Linux_64bit.tar.gz -O - | tar -C /usr/local/bin -xz gm
- gm --pages '**/*'
artifacts:
paths:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ This tool is a thin wrapper around the [github.com/yuin/goldmark](https://github

```
> gm -h
gm (version: 0.17.1): a goldmark cli tool which is a thin wrapper around github.com/yuin/goldmark (versio: v1.5.6).
gm (version: 0.17.2): a goldmark cli tool which is a thin wrapper around github.com/yuin/goldmark (versio: v1.5.6).
If not serving (no '--serve' or '-s' option is used):
- the .md files are converted and saved as .html with the same base name;
Expand Down
2 changes: 1 addition & 1 deletion gm_compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
)

// regexTitle is used to find the first h1 title (if any)
var regexTitle = regexp.MustCompile(`(?m)<h1[^>]*>([^<]+)</h1>`)
var regexTitle = regexp.MustCompile(`(?m)<h1[^>]*>(.*?)</h1>`)

// getTitle search for the first h1 title in the markdown
// if there is no one it returns the default title
Expand Down

0 comments on commit 96c4e08

Please sign in to comment.