opened
manfer
username_0
If I understood correctly this is how you want to solve https://github.com/PrismJS/prism/issues/645. By adding a new complete hook and changing line numbers plugin to run in that hook instead of running on after highlight hook.
Complete hook
issue
created
apfelbox
username_1
:+1:
comment
created
manfer
username_0
Not sure if you mean that an empty code block now triggers the complete hook and it shouldn't or if you want to trigger it and it doesn't. Anyway this code has nothing to do with that issue.

If,

```
<pre><code></code></pre>
```

is a problem before or after this code,

```
<pre><code class="lang-xxx"></code></pre>
```

for a valid xxx language is/was either. And this code does not deal in any way with that issue if there is any.

The hook addition has been suggested on https://github.com/PrismJS/prism/issues/645 and the problem that tries to solve is to include line numbers on source code for which there is no grammar.

So the complete hook runs at the end of proccess. For source code for which there is a grammar that's at the end, line 233. But for source code for which there is no grammar (`!grammar`) that's on line 196 before the `return`.

I'm not too familiarized with the library so the PR can be wrong of course. So needs review.
comment
created
Golmote
username_2
I made a few changes to your PR (see fd549959cd57d1c5de8be2f6d7600fe9bd050857) to take @uranusjr's comment into account.
comment
created
markg85
username_3
Thank you folks for fixing this (issue #645). It looks perfectly fine to me now.
comment