Skip to content

Add line numbering for code blocks#955

Open
kodsurfer wants to merge 1 commit into
diplodoc-platform:masterfrom
kodsurfer:add-line-numbering
Open

Add line numbering for code blocks#955
kodsurfer wants to merge 1 commit into
diplodoc-platform:masterfrom
kodsurfer:add-line-numbering

Conversation

@kodsurfer

Copy link
Copy Markdown

Description

Implemented line numbering for YFM code blocks.

Changes

  1. src/transform/plugins/code.ts
    Added regexp SHOW_LINE_NUMBERS_RE and cleared token.info from showLineNumbers .

  2. src/scss/_code.scss
    Added CSS styles for .yfm-line-number.

Related issue: #534

@kodsurfer kodsurfer requested review from a team and diplodoc-bot as code owners June 9, 2026 23:32
@kodsurfer kodsurfer requested review from Yurok868 and removed request for a team June 9, 2026 23:32

@goldserg goldserg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix lint and test errors

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.

3 participants