Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Trim empty first lines of a code block #91

Open
@PhalanxHead

Description

@PhalanxHead

Basically, when I use a code snippet like below, that I've likely pasted in from another document:

<pre><code>fn main() {    println!("Hello World"!);}</code></pre>

Line 1 (usinghljs.initLineNumbersOnLoad();) will always be blank, as it registers the line break after the<code> tag as a new line.

It's easy enough to fix, it's just a little annoying.

Describe the solution you'd like
Optionally remove the first line from the code block if it's empty.

Describe alternatives you've considered
Technically you can do this:

<pre><code>fn main() {    println!("Hello World"!);}</code></pre>

But it looks a little gross to me idk.

Not a high priority by any means, but I think it would feel nice :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp