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

Line number support #2

Closed
funtion opened this issue Feb 23, 2017 · 1 comment
Closed

Line number support #2

funtion opened this issue Feb 23, 2017 · 1 comment

Comments

@funtion
Copy link

funtion commented Feb 23, 2017

Is there any plan to support line number?

@egoist
Copy link
Owner

egoist commented Feb 23, 2017

You can achieve this easily by yourself:

let lineNumber = 0
let out = hanabi(code)
  .replace(/^/gm, m => {
    return `<span style="width: 30px; display: inline-block">${++lineNumber}</span>`
  })

And how it looks like:

2017-02-23 8 52 11

@egoist egoist closed this as completed Feb 23, 2017
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

2 participants