Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with spans across lines. #1

Open
ralsina opened this issue Apr 1, 2018 · 0 comments
Open

Problem with spans across lines. #1

ralsina opened this issue Apr 1, 2018 · 0 comments

Comments

@ralsina
Copy link

ralsina commented Apr 1, 2018

Hi! I am using this plugin to get line numbers in my book code samples, and I ran into an issue.

When faced with this kind of code:

```python
"""Usage:

whatever
"""
```

Markdown will be converted into this (by the highlight plugin?):

<span class="hljs-string">"""
Usage:
whatever
""""</span>

And then when your plugin tries to wrap lines in code-line spans, things break because opening/closing tags don't match anymore:

<span class="code-line"><span class="hljs-string">"""</span>
<span class="code-line">Usage:</span>
<span class="code-line">whatever</span>
<span class="code-line">""""</span></span>

The effect is that the whole thing is only counted as one line.

It doesn't look easy to fix, it would need to keep track of open spans and close them then reopen them in the next line?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant