Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
denser
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
denser
Merge requests
!557
Move hive renderer to internal packages
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Move hive renderer to internal packages
eb-move-hive-renderer-to-internal-packages
into
main
Overview
0
Commits
61
Pipelines
2
Changes
2
Merged
Efe
requested to merge
eb-move-hive-renderer-to-internal-packages
into
main
1 month ago
Overview
0
Commits
61
Pipelines
2
Changes
2
Expand
This reverts merge request
!5 (merged)
0
0
Merge request reports
Viewing commit
80a1f56c
Prev
Next
Show latest version
2 files
+
17
−
2
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
80a1f56c
refactor: add default title
· 80a1f56c
Efe
authored
1 month ago
src/renderers/default/plugins/SpoilerPlugin.ts
+
2
−
2
Options
@@ -7,7 +7,7 @@ export class SpoilerPlugin implements RendererPlugin {
return
text
.
replace
(
/^>! *
\[(
.*
?)\]
*
(
.*
?)(?:\n
|$
)([\s\S]
*
?)(?=
^>! *
\[
|$
)
/gm
,
(
_
,
title
,
firstLine
,
rest
)
=>
{
// Get the first line content (after the title)
const
content
=
firstLine
.
trim
();
// Get the rest of the content (lines starting with >)
const
restContent
=
rest
.
split
(
'
\n
'
)
@@ -20,7 +20,7 @@ export class SpoilerPlugin implements RendererPlugin {
// Combine all content
const
fullContent
=
[
content
,
restContent
].
filter
(
Boolean
).
join
(
'
'
);
return
`<details class="spoiler"><summary>
${
title
}
</summary><p>
${
fullContent
}
</p></details>`
;
return
`<details class="spoiler"><summary>
${
title
||
'
Reveal spoiler
'
}
</summary><p>
${
fullContent
}
</p></details>`
;
});
}
}
Loading