diff options
author | tilpner | 2019-05-03 16:30:54 +0200 |
---|---|---|
committer | tilpner | 2019-05-03 16:31:31 +0200 |
commit | 70cb3885b414fa9f895019e2e329e9f683ee0f18 (patch) | |
tree | b38bb3bd5fca945455a580a47592f4f3f736e0b9 /src | |
parent | 9dff075fb065d7b97db9663f98af25efe016a9e2 (diff) | |
download | rpb-s3-70cb3885b414fa9f895019e2e329e9f683ee0f18.tar.gz rpb-s3-70cb3885b414fa9f895019e2e329e9f683ee0f18.tar.xz rpb-s3-70cb3885b414fa9f895019e2e329e9f683ee0f18.zip |
Reduce empty lines in chromium ctrl-A selection
Diffstat (limited to 'src')
-rw-r--r-- | src/code.html | 2 | ||||
-rw-r--r-- | src/main.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/code.html b/src/code.html index f459b4e..f4903f5 100644 --- a/src/code.html +++ b/src/code.html @@ -27,7 +27,7 @@ text-decoration: none; } .linenumbers a:after \{ - content: attr(data-txt); + content: attr(data-txt) " \A"; } </style> </head> diff --git a/src/main.rs b/src/main.rs index 6413bea..6fb7cc8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -192,9 +192,9 @@ fn highlight(cfg: &Config, mut input: Box<dyn BufRead + Send>) -> impl Iterator< let mut html = Vec::new(); let mut formatted_line = String::new(); let (_, bg) = start_highlighted_html_snippet(theme); - let _ = write!(&mut html, "<table><tr><td unselectable=\"on\"><pre class=\"linenumbers\">"); + let _ = write!(&mut html, "<table><tr><td><pre class=\"linenumbers\" disabled>"); for (i, _line) in input_str.lines().enumerate() { - let _ = writeln!(&mut html, "<a href=\"#L{}\" data-txt=\"{}\"></a>", i, i); + let _ = write!(&mut html, "<a href=\"#L{}\" data-txt=\"{}\"></a>", i, i); } let _ = write!(&mut html, "</pre></td><td><pre class=code><code>"); |