Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{ } in code blocks convert to { and } #4385

Closed
dumindu opened this issue Jun 28, 2020 · 3 comments · Fixed by #4395
Closed

{ } in code blocks convert to { and } #4385

dumindu opened this issue Jun 28, 2020 · 3 comments · Fixed by #4395

Comments

@dumindu
Copy link

dumindu commented Jun 28, 2020

Question

Screenshot 2020-06-28 at 12 17 23 PM

Environment & Settings

Node.js & npm version

v14.4.0
6.14.4

Your site _config.yml (Optional)

title: Learning Rust
subtitle: "Rust Programming Language Tutorials"
description: "Rust Programming Language Tutorials"
author: Dumindu Madunuwan
language: en
timezone: UTC

url: https://learning-rust.github.io
root: /

theme: navy

deploy:
  type: git
  repo: git@github.com:learning-rust/learning-rust.github.io.git

highlight:
  enable: false

hljs:
  enable: true

Hexo and Plugin version(npm ls --depth 0)

├── cheerio@0.22.0
├── eslint@7.3.1
├── eslint-config-hexo@4.1.0
├── hexo@4.2.0 (github:hexojs/hexo#65961d328192e948586dd3c2a2b856173c628ef0)
├── hexo-clean-css@1.0.0
├── hexo-deployer-git@2.1.0
├── hexo-filter-nofollow@2.0.2
├── hexo-fs@3.1.0
├── hexo-generator-sitemap@2.0.0
├── hexo-renderer-marked@2.0.0
├── hexo-renderer-pug@1.0.0
├── hexo-renderer-stylus@1.1.0
├── hexo-renderer-swig@1.1.0
├── hexo-server@1.0.0
├── hexo-uglify@1.1.0
├── husky@4.2.5
├── imagemin-lint-staged@0.4.0
├── lint-staged@10.2.11
├── lunr@2.3.8
└── sharp@0.25.4

Your package.json package.json

{
  "name": "learning-rust.github.io",
  "version": "0.0.0",
  "private": true,
  "hexo": {
    "version": "4.2.0"
  },
  "scripts": {
    "build": "hexo generate",
    "eslint": "eslint .",
    "deploy": "hexo deploy"
  },
  "dependencies": {
    "cheerio": "^0.22.0",
    "hexo": "hexojs/hexo",
    "hexo-clean-css": "^1.0.0",
    "hexo-deployer-git": "^2.1.0",
    "hexo-filter-nofollow": "^2.0.2",
    "hexo-fs": "^3.1.0",
    "hexo-generator-sitemap": "^2.0.0",
    "hexo-renderer-marked": "^2.0.0",
    "hexo-renderer-pug": "^1.0.0",
    "hexo-renderer-stylus": "^1.0.0",
    "hexo-renderer-swig": "^1.1.0",
    "hexo-server": "^1.0.0",
    "hexo-uglify": "^1.0.0",
    "lunr": "2.3.8",
    "sharp": "^0.25.2"
  },
  "devDependencies": {
    "eslint": "^7.0.0",
    "eslint-config-hexo": "^4.0.0",
    "husky": "^4.0.7",
    "imagemin-lint-staged": "^0.4.0",
    "lint-staged": "^10.2.2"
  },
  "husky": {
    "hooks": {
      "pre-commit": "lint-staged"
    }
  },
  "lint-staged": {
    "*.{png,jpeg,jpg,gif,svg}": [
      "imagemin-lint-staged",
      "git add"
    ]
  },
  "engines": {
    "node": ">=8.10.0"
  }
}

Thanks

@stevenjoezhang
Copy link
Member

See also #4362

@SukkaW
Copy link
Member

SukkaW commented Jul 4, 2020

@dumindu

Is the page here that went wrong?

https://github.com/learning-rust/site/blob/b24e78a792adea28bf8169863c0ab23cf7cb746c/source/docs/a7.functions.md

I am not sure whether the issue has been fixed or not (we lost the track of it), so I will add a test case specific for your issue.

@dumindu
Copy link
Author

dumindu commented Jul 4, 2020

Thanks @stevenjoezhang @SukkaW for the verification. I am not good at node and js. It looks like,

npm install hexo-cli -g
npm install

sets "hexo": {"version": "4.2.0"}, on package.json, even I set it to v.4.2.1 before running above commands.

env : macOS,
tested with both node and nvm;(brew install); after uninstall all related to node and hexo ; (Node v14.5.0 & v12.18.2)

However in a one attempt with nvm node 12.18.2 I could stick with hexo v.4.2.1 and could deploy stuff to my site by changing "dependencies": { "hexo": "hexojs/hexo", ...} to "dependencies": { "hexo": "^4.2.1", ...}` in the package.json.

{
  "name": "learning-rust.github.io",
  "version": "0.0.0",
  "private": true,
  "hexo": {
    "version": "4.2.1"
  },
  "scripts": {
    "build": "hexo generate",
    "eslint": "eslint .",
    "deploy": "hexo deploy"
  },
  "dependencies": {
    "cheerio": "^0.22.0",
    "hexo": "^4.2.1",
    "hexo-clean-css": "^1.0.0",
    "hexo-deployer-git": "^2.1.0",
    "hexo-filter-nofollow": "^2.0.2",
    "hexo-fs": "^3.1.0",
    "hexo-generator-sitemap": "^2.0.0",
    "hexo-renderer-marked": "^3.0.0",
    "hexo-renderer-pug": "^1.0.0",
    "hexo-renderer-stylus": "^1.0.0",
    "hexo-renderer-swig": "^1.1.0",
    "hexo-server": "^1.0.0",
    "hexo-uglify": "^1.0.0",
    "lunr": "2.3.8",
    "sharp": "^0.25.2"
  },
  "devDependencies": {
    "eslint": "^7.0.0",
    "eslint-config-hexo": "^4.0.0",
    "husky": "^4.0.7",
    "imagemin-lint-staged": "^0.4.0",
    "lint-staged": "^10.2.2"
  },
  "husky": {
    "hooks": {
      "pre-commit": "lint-staged"
    }
  },
  "lint-staged": {
    "*.{png,jpeg,jpg,gif,svg}": [
      "imagemin-lint-staged",
      "git add"
    ]
  },
  "engines": {
    "node": ">=8.10.0"
  }
}

Looks like some issue on my side. Thanks again for the verification.

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 a pull request may close this issue.

3 participants