Skip to content

chore: fix README typo #319

chore: fix README typo

chore: fix README typo #319

Workflow file for this run

name: panvimdoc
on:
push:
branches:
- '**'
paths:
- README.md
- .github/workflows/vimdocs.yml
- doc/**
- lua/kitty-scrollback/launch.lua
- lua/kitty-scrollback/api.lua
workflow_dispatch:
jobs:
vimdoc:
runs-on: ubuntu-22.04
name: generate vimdoc
steps:
- uses: actions/checkout@v2
- name: lemmyhelp
run: |
curl -Lq https://github.com/numToStr/lemmy-help/releases/latest/download/lemmy-help-x86_64-unknown-linux-gnu.tar.gz | tar xz
./lemmy-help -c -a -f lua/kitty-scrollback/launch.lua lua/kitty-scrollback/configs/defaults.lua lua/kitty-scrollback/api.lua > doc/kitty-scrollback.nvim_spec.txt
- name: preformat README.md
run: |
mkdir -p tmp_vimdoc_workdir
cp README.md tmp_vimdoc_workdir/README.md
sed -E -e's/\[!(NOTE|WARNING|IMPORTANT)\].*/[!\1]\n>/Ig' -e 's/.*<summary>(.+)<\/summary>/- VIMDOC_SUMMARY_HEADER `\1`\n/g' \
-e 's/<a.*href.*"(.+)".*>(.+)<\/a>/\2 <\1>/g' <README.md >tmp_vimdoc_workdir/README.md
- name: panvimdoc
uses: kdheepak/panvimdoc@main
with:
vimdoc: kitty-scrollback.nvim
pandoc: "tmp_vimdoc_workdir/README.md"
description: "For NVIM v0.9+"
toc: true
demojify: true
dedupsubheadings: false
treesitter: true
- name: postformat kitty-scrollback.nvim.txt
run: |
cp doc/kitty-scrollback.nvim.txt tmp_vimdoc_workdir/kitty-scrollback.nvim.txt
sed -E \
-e 's/\[!(IMPORTANT)\]/|‼| |\1|/Ig' \
-e 's/\[!(NOTE)\]/`ℹ` `\1` /Ig' \
-e 's/\[!(WARNING)\]/*⚠* *\1* /Ig' \
-e 's/^- VIMDOC_SUMMARY_HEADER(.*)/\n`-`\1/g' \
-e 's/^[[:space:]]+(>.*)/\n\1/g' \
-e 's/^[[:space:]]+(<.*)/\1/g' \
<tmp_vimdoc_workdir/kitty-scrollback.nvim.txt >doc/kitty-scrollback.nvim.txt
- name: cleanup preformat README.md
run: |
rm -rf tmp_vimdoc_workdir
- uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: ${{ github.head_ref }}
commit_message: "chore(build): auto-generate vimdoc"
commit_user_name: "github-actions[bot]"
commit_user_email: "github-actions[bot]@users.noreply.github.com"
commit_author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
file_pattern: doc/*.txt