-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Labels
bugIssue reports a bugIssue reports a bugresolvedIssue is resolved, yet unreleased if openIssue is resolved, yet unreleased if open
Description
Context
I want to make it easier for folks to copy configuration examples from my documentation page, by using the copy feature.
Bug description
When clicking the copy icon in all code blcoks on my documentation site, I get extra blank newlines in between the content.
I initially thought it was due to Annotations in code blocks, but does not seem to be the case.
Manually "drag cursor over text and copy" works fine.
Related links
Reproduction
Click any copy icon from my related links section and see that you get double newlines
For example; the Generate labels via script code block:
Expected
label:
# Generate list of labels via script
- strategy: generate
# With a description (optional)
description: "Modified this service directory"
# With the color $pink
color: "$pink"
# From this script, returning a list of labels
script: >
/* Generate a list of files changed in the MR inside pkg/service/ */
merge_request.modified_files_list("pkg/service/")
/* Remove the filename from the path
pkg/service/example/file.go => pkg/service/example */
| map({ filepath_dir(#) })
/* Remove the prefix "pkg/" from the path
pkg/service/example => service/example */
| map({ trimPrefix(#, "pkg/") })
/* Remove duplicate values from the output */
| uniq()Actual
label:
# Generate list of labels via script
- strategy: generate
# With a description (optional)
description: "Modified this service directory"
# With the color $pink
color: "$pink"
# From this script, returning a list of labels
script: >
/* Generate a list of files changed in the MR inside pkg/service/ */
merge_request.modified_files_list("pkg/service/")
/* Remove the filename from the path
pkg/service/example/file.go => pkg/service/example */
| map({ filepath_dir(#) })
/* Remove the prefix "pkg/" from the path
pkg/service/example => service/example */
| map({ trimPrefix(#, "pkg/") })
/* Remove duplicate values from the output */
| uniq()Steps to reproduce
- Go to any page
- Click the
copyicon - Paste into any editor or window
Browser
No response
Before submitting
- I have read and followed the bug reporting guidelines.
- I have attached links to the documentation, and possibly related issues and discussions.
- I assure that I have removed all customizations before submitting this bug report.
- I have attached a .zip file with a minimal reproduction using the built-in info plugin.
Metadata
Metadata
Assignees
Labels
bugIssue reports a bugIssue reports a bugresolvedIssue is resolved, yet unreleased if openIssue is resolved, yet unreleased if open