Closed clason closed 1 year ago
@justinmk I think this is good to go. The next step is to adapt scripts/gen_help_html.lua
to
language
nodecode
node wrapped in a <code class='language-<language>'></code>
blockand inject highlight.js
to the neovim.io/doc/user
pages. But for that the ball is in your corner :)
I found some cases in the help docs that we should test for:
runtime/bugreport.vim|20 col 20| : !echo "uname -a" >bugreport.txt
runtime/doc/eval.txt|1051 col 2| >0 / 0 = 0x7fffffff (like positive infinity)
runtime/doc/eval.txt|1057 col 2| >0 / 0 = 0x7fffffffffffffff (like positive infinity)
runtime/doc/luaref.txt|460 col 24| while ( step >0 and var <= limit )
runtime/doc/usr_02.txt|548 col 7| :help >cont
runtime/doc/usr_10.txt|707 col 17| sort <input.txt >output.txt
runtime/bugreport.vim|20 col 20| : !echo "uname -a" >bugreport.txt
Not a help file.
runtime/doc/eval.txt|1051 col 2| >0 / 0 = 0x7fffffff (like positive infinity) runtime/doc/eval.txt|1057 col 2| >0 / 0 = 0x7fffffffffffffff (like positive infinity)
Not at the end of the line, so doesn't match.
runtime/doc/luaref.txt|460 col 24| while ( step >0 and var <= limit ) runtime/doc/usr_02.txt|548 col 7| :help >cont runtime/doc/usr_10.txt|707 col 17| sort
output.txt
Inside a codeblock (and not on the end of the line or not [a-z0-9]+
), so doesn't match.
Not at the end of the line, so doesn't match.
worth adding an explicit case to the corpus?
Oh, I see what you mean. Yes, I can see about adding a case with whitespace and not at the end of the line; maybe variants of the usr_*.txt
examples.
not a blocker, but this bugs me about >lua
:
lua>
lua>
is more visually noticeable (for non-concealed text) because >
is at EOL as usualThis is just thinking out loud. Will merge this later this week.
Sorry, I tried to make that work; I failed.
Note that the alternative syntax
lua>
is much trickier, since the rule for the language markerlua
conflicts with normal text rule for the wordlua
. In either case, the added markers are trivial (and necessary) to add to the legacy syntax file.Closes #2