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

fix(filter/highlight): avoid escaping curly bracket when highlight & prismjs disabled #4489

Merged
merged 1 commit into from
Aug 23, 2020

Conversation

curbengh
Copy link
Contributor

What does it do?

Fixes #4482

How to test

git clone -b unescape-curly-bracket https://github.com/curbengh/hexo.git
cd hexo
npm install
npm test

Screenshots

Pull request tasks

  • Add test cases for the changes.
  • Passed the CI test.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 98.296% when pulling b7e1150 on curbengh:unescape-curly-bracket into ebc9008 on hexojs:master.

@curbengh
Copy link
Contributor Author

curbengh commented Aug 23, 2020

{% asset_img 'icon.jpg' %}

{% codeblock lang:objc wrap:true title:bob %}
[rectangle setX: 10 y: 10 width: 20 height: 20];
{% endcodeblock %}

```js caption
console.log('foo')
```

<br>

``` foo
lorem ipsum dolor
```

![hello](https://via.placeholder.com/100x100)

```markdown
{% meting "000PeZCQ1i4XVs" "tencent" "artist" "theme:#3F51B5" "mutex:true" "preload:auto" %}
```

``` js
{% asset_img 'icon.jpg' %}
```

`{% test %}`

before:

before

after:

after

Copy link
Member

@SukkaW SukkaW left a comment

Choose a reason for hiding this comment

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

LGTM!

@SukkaW SukkaW merged commit 5795c12 into hexojs:master Aug 23, 2020
@curbengh curbengh deleted the unescape-curly-bracket branch August 23, 2020 06:45
@curbengh curbengh mentioned this pull request Aug 23, 2020
2 tasks
@FuShaoLei
Copy link

Great !

@csy99
Copy link

csy99 commented Aug 27, 2020

Thank you for the update. I update the file lib/plugins/filter/before_post_render/backtick_code_block.js according to b7e1150. However, the curly brackets in the code block still cannot be displayed correctly. Did I miss any changes?

@curbengh
Copy link
Contributor Author

curbengh commented Aug 27, 2020

Make sure you have rebased to the latest hexojs/hexo master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants