Skip to content

Commit 1975695

Browse files
committed
Merge branch 'release/1.2.0'
2 parents 258471c + e98a480 commit 1975695

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# v1.2.0
2+
## 12/23/2025
3+
4+
1. [](#improved)
5+
* Support regular `codesh` styling and features while inside a `codesh-group` shortcode
6+
17
# v1.1.0
28
## 12/23/2025
39

blueprints.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Code Syntax Highlighter
22
slug: codesh
33
type: plugin
4-
version: 1.1.0
4+
version: 1.2.0
55
description: Server-side syntax highlighting using Phiki with line numbers, line highlighting, and focus support
66
icon: code
77
author:

classes/shortcodes/CodeshGroupShortcode.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,12 @@ protected function process(ShortcodeInterface $sc): string
109109
$output .= '<div class="codesh-group-panels">';
110110
foreach ($panels as $panel) {
111111
$activeClass = $panel['active'] ? ' active' : '';
112-
// Modify the panel HTML to add the panel wrapper and remove outer div classes
112+
// Modify the panel HTML to add the panel wrapper while preserving codesh-block class
113113
$panelHtml = $panel['html'];
114-
// Replace the outer codesh-block div with our panel div
114+
// Add codesh-group-panel class to the outer div while keeping codesh-block for styling
115115
$panelHtml = preg_replace(
116-
'/<div class="codesh-block[^"]*"/',
117-
'<div class="codesh-group-panel' . $activeClass . '" data-panel="' . $panel['id'] . '"',
116+
'/<div class="codesh-block([^"]*)"/',
117+
'<div class="codesh-group-panel codesh-block$1' . $activeClass . '" data-panel="' . $panel['id'] . '"',
118118
$panelHtml,
119119
1
120120
);

css/codesh.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -389,16 +389,16 @@
389389
position: relative;
390390
}
391391

392-
/* Individual panel */
393-
.codesh-group-panel {
392+
/* Individual panel - use higher specificity to override .codesh-block base styles */
393+
.codesh-group-panel.codesh-block {
394394
display: none;
395395
margin: 0;
396396
border-radius: 0;
397397
box-shadow: none;
398398
background: transparent;
399399
}
400400

401-
.codesh-group-panel.active {
401+
.codesh-group-panel.codesh-block.active {
402402
display: block;
403403
}
404404

0 commit comments

Comments
 (0)