npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

textlint-rule-zh-double-zh-ellipsis

v0.0.3

Published

A textlint rule for Chinese texts

Downloads

11

Readme

textlint-rule-zh-double-zh-ellipsis

textlint-rule-preset-zh-technical-writing 提供的适用于中文技术文档写作的 textlint 规则,用于检测文本中使用的省略号是否符合规范。

规则介绍

中文省略号的形式为“……”,有六个小圆点,占两个汉字的宽度。一般而言,中文语境中禁止使用英文省略号,即三个小圆点“…”(占一个汉字的宽度),必须使用六个小圆点“……”。

在大多数中文输入法中,可以使用 Shift + 6 来打出中文省略号。

本规则可被自动修复,可以向 textlint 传递 --fix 参数来自动修复文本中出现的错误。为了方便,你可以在书写文字时使用英文的省略号,或者是使用三个连续的英文句号,然后交给规则来自动修复为中文省略号。

通过规则的例子

泰拉世界……的人们……都这么……说话。

中枪的团长没有立刻倒下,而是转头说:“所以,请不要停下来……”

违反规则的例子

我…………这句话停顿了很久。

我…这句话停顿了一下下。

我...喜欢使用英文......省略号。

参考

本规则及介绍参考了《中文技术文档写作风格指南》中的常用标点符号一节。

配置项

暂无。

提出 issue

如果你在使用本规则的过程中出现了误报,或者对本规则有任何疑问或者改进意见,欢迎提出 issue

使用方法

方法一:直接使用 textlint-rule-preset-zh-technical-writing

这是最简单的方法,参见 textlint-rule-preset-zh-technical-writing 的 README

方法二:手动安装

使用 npm 安装:

npm install -g textlint-rule-zh-core textlint-rule-zh-double-zh-ellipsis

创建 entry.js,名称任意:

const { withRules } = require('textlint-rule-zh-core');
const correctlyOrderedPairs = require('textlint-rule-zh-double-zh-ellipsis');

// 这里 withRule(...) 的返回值就是你可以提供给 textlint 的 rule 对象
module.exports = withRules([correctlyOrderedPairs]);

运行 textlint:

textlint --rulesdir <entry.js所在的文件夹路径> [其他参数] <要lint的文件名>