chore: update branch

pull/240/head
sammyette 2023-07-09 15:17:55 -04:00
commit 4a3ceed39c
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
4 changed files with 32 additions and 4 deletions

View File

@ -19,13 +19,17 @@ jobs:
hugo-version: 'latest'
extended: true
- name: Build
run: 'cd website && hugo --minify'
- name: Set branch name
id: branch
run: echo "::set-output name=BRANCH_NAME::${GITHUB_REF##*/}"
- name: Fix base URL
if: steps.branch.outputs.BRANCH_NAME != 'master' && github.repository_owner == 'Rosettea'
run: sed -i "s%baseURL = 'https://rosettea.github.io/Hilbish/'%baseURL = 'https://rosettea.github.io/Hilbish/versions/${{ steps.branch.outputs.BRANCH_NAME }}'%" website/config.toml
- name: Build
run: 'cd website && hugo --minify'
- name: Deploy
if: steps.branch.outputs.BRANCH_NAME == 'master' && github.repository_owner == 'Rosettea'
uses: peaceiris/actions-gh-pages@v3
@ -39,5 +43,5 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./website/public
destination_dir: versions/${( steps.branch.outputs.BRANCH_NAME }}
destination_dir: versions/${{ steps.branch.outputs.BRANCH_NAME }}
keep_files: true

8
api.go
View File

@ -639,6 +639,14 @@ func hlhinter(t *rt.Thread, c *rt.GoCont) (rt.Cont, error) {
// reality could set the input of the prompt to *display* anything. The
// callback is passed the current line and is expected to return a line that
// will be used as the input display.
// Note that to set a highlighter, one has to override this function.
// Example:
// ```
// function hilbish.highlighter(line)
// return line:gsub('"%w+"', function(c) return lunacolors.green(c) end)
// end
// ```
// This code will highlight all double quoted strings in green.
// --- @param line string
func hlhighlighter(t *rt.Thread, c *rt.GoCont) (rt.Cont, error) {
return c.Next(), nil

View File

@ -49,6 +49,14 @@ Line highlighter handler. This is mainly for syntax highlighting, but in
reality could set the input of the prompt to *display* anything. The
callback is passed the current line and is expected to return a line that
will be used as the input display.
Note that to set a highlighter, one has to override this function.
Example:
```
function hilbish.highlighter(line)
return line:gsub('"%w+"', function(c) return lunacolors.green(c) end)
end
```
This code will highlight all double quoted strings in green.
### hinter(line, pos)
The command line hint handler. It gets called on every key insert to

View File

@ -79,6 +79,14 @@ function hilbish.goro(fn) end
--- reality could set the input of the prompt to *display* anything. The
--- callback is passed the current line and is expected to return a line that
--- will be used as the input display.
--- Note that to set a highlighter, one has to override this function.
--- Example:
--- ```
--- function hilbish.highlighter(line)
--- return line:gsub('"%w+"', function(c) return lunacolors.green(c) end)
--- end
--- ```
--- This code will highlight all double quoted strings in green.
--- @param line string
function hilbish.highlighter(line) end