hexojs / hexo-filter-auto-spacing Goto Github PK
View Code? Open in Web Editor NEWAdd spaces between CJK characters and western characters.
License: MIT License
Add spaces between CJK characters and western characters.
License: MIT License
pangu.js
added support for NodeJS and pangunode has been deprecated.
A possible usage:
const pangu = require('pangu');
data.title = pangu.spacing(data.title);
data.content = pangu.spacing(data.content);
比如在文章内的链接
[文章链接] (/2017/03/10/文章名.md)
或者
{% post_link 文章名 Custom Title %}
当文章名中有中英文的时候, 由于被自动加了空格, 会导致找不到文章
Hexo拥有
{% raw %}
<script>
alert()
</script>
{% endraw %}
语法,在该模块内的内容不会被解析器解析,因此这部分的内容也不应该自动添加空格。
希望在自动添加空格时可以跳过这部分的内容,不对raw模块内部的内容做处理。
"auto_spacing" doesn't work. Even I also set it as true, there weren't spaces between Chinese and English, just as the following:
My environment information:
hexo: 4.2.0
hexo-cli: 3.1.0
os: Windows_NT 10.0.18362 win32 x64
node: 12.13.1
v8: 7.7.299.13-node.16
uv: 1.33.1
zlib: 1.2.11
brotli: 1.0.7
ares: 1.15.0
modules: 72
nghttp2: 1.39.2
napi: 5
llhttp: 1.1.4
http_parser: 2.8.0
openssl: 1.1.1d
cldr: 35.1
icu: 64.2
tz: 2019c
unicode: 12.1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.