-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
markup: improve code block readability and isolate copy button #34009
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
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
ae828d8
markup: add horizontal scroll to code blocks and isolate copy button
bigdeejay 95f7abb
Delete modules/highlight/highlight.go
bigdeejay bb1efdb
Revert "Delete modules/highlight/highlight.go"
bigdeejay 0cedac0
fix comment
bigdeejay f2bf153
fix comment
bigdeejay 5ba3a88
fix visibility
bigdeejay 1be4b3e
첫번째 코드블럭에만 copy-button 추가되는 현상 수정
bigdeejay f61cb3c
Merge branch 'main' into fix-markup-code-block
wxiaoguang e843113
fix
wxiaoguang 0a4a29a
fine tune
wxiaoguang 4188181
Update web_src/js/markup/codecopy.ts
wxiaoguang bb3ffad
Merge branch 'main' into main
lunny 8844e30
Merge branch 'main' into main
wxiaoguang df783d5
Merge branch 'main' into main
wxiaoguang be0684c
Merge branch 'main' into main
GiteaBot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
{{template "devtest/devtest-header"}} | ||
<div class="page-content devtest ui container"> | ||
{{$longCode := "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"}} | ||
<div class="tw-flex"> | ||
<div class="tw-w-[50%] tw-p-4"> | ||
<div class="markup render-content"> | ||
Inline <code>code</code> content | ||
</div> | ||
|
||
<div class="divider"></div> | ||
|
||
<div class="markup render-content"> | ||
<p>content before</p> | ||
<pre><code>Very long line with no code block or container: {{$longCode}}</code></pre> | ||
<p>content after</p> | ||
</div> | ||
|
||
<div class="divider"></div> | ||
|
||
<div class="markup render-content"> | ||
<p>content before</p> | ||
<div class="code-block-container code-overflow-wrap"> | ||
<pre class="code-block"><code>Very long line with wrap: {{$longCode}}</code></pre> | ||
</div> | ||
<p>content after</p> | ||
</div> | ||
|
||
<div class="divider"></div> | ||
|
||
<div class="markup render-content"> | ||
<p>content before</p> | ||
<div class="code-block-container code-overflow-scroll"> | ||
<pre class="code-block"><code>Short line in scroll container</code></pre> | ||
</div> | ||
<div class="code-block-container code-overflow-scroll"> | ||
<pre class="code-block"><code>Very long line with scroll: {{$longCode}}</code></pre> | ||
</div> | ||
<p>content after</p> | ||
</div> | ||
</div> | ||
|
||
<div class="tw-w-[50%] tw-p-4"> | ||
<div class="markup render-content"> | ||
<p>content before</p> | ||
<div class="code-block-container"> | ||
<pre class="code-block"><code class="language-math"> | ||
\lim\limits_{n\rightarrow\infty}{\left(1+\frac{1}{n}\right)^n} | ||
</code></pre> | ||
</div> | ||
<p>content after</p> | ||
</div> | ||
|
||
<div class="divider"></div> | ||
|
||
<div class="markup render-content"> | ||
<p>content before</p> | ||
<div class="code-block-container"> | ||
<pre class="code-block"><code class="language-mermaid is-loading"> | ||
graph LR | ||
A[Square Rect] -- Link text --> B((Circle)) | ||
A --> C(Round Rect) | ||
B --> D{Rhombus} | ||
C --> D | ||
</code></pre> | ||
</div> | ||
<p>content after</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{{template "devtest/devtest-footer"}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.