GithubHelp home page GithubHelp logo

blocklune / hexo-blockquote2note Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 82 KB

A Hexo plugin that renders blockquotes to note tag in NexT theme.

License: GNU General Public License v3.0

TypeScript 100.00%
blog hexo markdown next-theme

hexo-blockquote2note's Introduction

Hi there ๐Ÿ‘‹ This is BlockLune

  • ๐Ÿ”ญ Iโ€™m studying at NJUPT
  • ๐ŸŒฑ I'm learning vim!
  • ๐Ÿ“ซ How to reach me: [email protected]

BlockLune's GitHub Stats

BlockLune's Most Used Languages

trophy

GitHub Streak

hexo-blockquote2note's People

Contributors

blocklune avatar

Stargazers

 avatar

Watchers

 avatar

hexo-blockquote2note's Issues

Line numbers in stack traces are wrong in Node v21

Introduction

There is an incorrect use of negative index in the commit 16732f7 that causes some tests to fail. The line number problem occurred in the error message that the tests output.

Part of the error message:

  1) Lines Transformation Tests
       should work when blockquote has no config:
     TypeError: Cannot read properties of undefined (reading 'match')
      at blockquoteLines2NoteLines (lib/blockquote.ts:2:1585)
      at Context.<anonymous> (test/blockquote.test.ts:2:361)
      at process.processImmediate (node:internal/timers:478:21)

  2) Lines Transformation Tests
       should work when blockquote has not full config:
     TypeError: Cannot read properties of undefined (reading 'match')
      at blockquoteLines2NoteLines (lib/blockquote.ts:2:1585)
      at Context.<anonymous> (test/blockquote.test.ts:2:785)
      at process.processImmediate (node:internal/timers:478:21)

  3) Lines Transformation Tests
       should work when blockquote has full config:
     TypeError: Cannot read properties of undefined (reading 'match')
      at blockquoteLines2NoteLines (lib/blockquote.ts:2:1585)
      at Context.<anonymous> (test/blockquote.test.ts:2:1226)
      at process.processImmediate (node:internal/timers:478:21)

Expected Behavior

The line numbers in the stack traces should match the actual line numbers in the file.

Actual Behavior

The line numbers are wrong.

Environment

  • MacBook Air M1, 2020 (macOS Sonoma 14.3)
  • Node v21.6.1 (npm v10.4.0)
  • tsx v4.7.0
  • mocha v10.2.0

Attempted Methods

I found this and I tried to use another version of node using nvm. The expected behavior was met on node v20.11.0 (npm v10.2.4) and node v18.19.0 (npm v10.2.3). In both cases the same part of error message became:

  1) Lines Transformation Tests
       should work when blockquote has no config:
     TypeError: Cannot read properties of undefined (reading 'match')
      at blockquoteLines2NoteLines (lib/blockquote.ts:32:31)
      at Context.<anonymous> (test/blockquote.test.ts:12:20)
      at process.processImmediate (node:internal/timers:476:21)

  2) Lines Transformation Tests
       should work when blockquote has not full config:
     TypeError: Cannot read properties of undefined (reading 'match')
      at blockquoteLines2NoteLines (lib/blockquote.ts:32:31)
      at Context.<anonymous> (test/blockquote.test.ts:27:20)
      at process.processImmediate (node:internal/timers:476:21)

  3) Lines Transformation Tests
       should work when blockquote has full config:
     TypeError: Cannot read properties of undefined (reading 'match')
      at blockquoteLines2NoteLines (lib/blockquote.ts:32:31)
      at Context.<anonymous> (test/blockquote.test.ts:42:20)
      at process.processImmediate (node:internal/timers:476:21)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.