Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
build:
@./panvimdoc.sh "--project-name" "panvimdoc" "--input-file" "doc/panvimdoc.md" "--vim-version" "NVIM v0.8.0" "--toc" "true" "--description" "" "--dedup-subheadings" "true" "--demojify" "false" "--treesitter" "true" "--ignore-rawblocks" "true" "--doc-mapping" "false" "--doc-mapping-project-name" "true" --shift-heading-level-by 0 --increment-heading-level-by 0

test:
julia --project -e 'using Pkg; Pkg.test()'
4 changes: 4 additions & 0 deletions scripts/remove-emojis.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ function string.ends_with(str, ends)
end

local function cleanup(elem)
-- Don't touch code blocks
if elem.t == "Code" or elem.t == "CodeBlock" then
return elem
end
-- get rid of the space after the emoji, reset
if elem.t == "Space" and prevEmoji then
prevEmoji = false
Expand Down
42 changes: 29 additions & 13 deletions test/demojify.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
@testset "demojify" begin
doc = test_pandoc("""
doc = test_pandoc(
"""
Hello world :wave:

```sh
echo 😎cool # comment
echo 😎 cool # comment

```lua
"some/**/glob*"
```
"""; demojify = true)

`"some/**/glob*"`


""";
demojify = true,
)

@test """
*test.txt* Test Description
Expand All @@ -15,22 +24,30 @@ Table of Contents *test-table-of-contents*

Hello world

>sh
echo cool # comment
echocool # comment

>lua
\"some/**/glob*\"
<

`\"some/**/glob*\"`

Generated by panvimdoc <https://github.com/kdheepak/panvimdoc>

vim:tw=78:ts=8:noet:ft=help:norl:
""" == doc

doc = test_pandoc("""
Hello world :wave:
doc = test_pandoc(
"""
Hello world :wave:

```sh
echo 😎cool # comment
```
"""; demojify = false)
```sh
echo 😎cool # comment
```

""";
demojify = false,
)

@test """
*test.txt* Test Description
Expand Down Expand Up @@ -63,5 +80,4 @@ Generated by panvimdoc <https://github.com/kdheepak/panvimdoc>

vim:tw=78:ts=8:noet:ft=help:norl:
""" == doc

end