Skip to content

Update code-copy.js - #137

Open
ahil-k wants to merge 1 commit into
Track3:masterfrom
ahil-k:patch-1
Open

Update code-copy.js#137
ahil-k wants to merge 1 commit into
Track3:masterfrom
ahil-k:patch-1

Conversation

@ahil-k

@ahil-k ahil-k commented Jul 14, 2020

Copy link
Copy Markdown

Copy action copies line number along with code block. This change is to support copy if linenos=table

Copy action copies line number along with code block. This change is to support for copy if `linenos=table`
@DanHam

DanHam commented Aug 5, 2020

Copy link
Copy Markdown

This works for me

@AHIL-KANNA-WORK Thanks!

1bl4z3r added a commit to 1bl4z3r/hermit-V2 that referenced this pull request Oct 21, 2023
pingz pushed a commit to pingz/hermit-V2 that referenced this pull request Apr 11, 2025
xuekepei added a commit to xuekepei/hermit that referenced this pull request Aug 16, 2026
1. meta description (upstream issue Track3#119 — issue only, no PR)
   The theme never emitted <meta name="description">, so params.description
   went unused and Lighthouse reported "document does not have a meta
   description". baseof.html now falls back .Description -> .Summary ->
   .Site.Params.description.

2. Analytics into head (upstream PR Track3#151)
   Loads earlier, losing fewer hits from visitors who leave quickly.

3. code-copy with table layout (upstream PR Track3#137)
   With markup.highlight.lineNos enabled chroma emits a <table> and copying
   grabs the line numbers too; select only the code cell in that case.

4. Admonition shortcodes (upstream PR Track3#130)
   Adds note / tip / warning. Four defects in the original PR are fixed:
   - all three shared one blue border colour, making them indistinguishable
     -> coloured per semantic
   - content background used $highlight-grey, ~2.5:1 against $text, below
     the WCAG AA 4.5:1 minimum -> $light-grey, ~6.5:1
   - vertical margins sat on .admonition-content so the left border did not
     enclose the content -> moved to the container
   - .Inner abutted the <div>, so CommonMark's HTML block rule skipped
     inline Markdown parsing and bold/links inside the box stayed literal
     -> separated by blank lines
   Also drops $_hugo_config, deprecated since Hugo 0.55.

Verified on Hugo v0.164.0+extended: builds with no warnings, all three
colours compile, and Markdown inside the boxes renders.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants