segmentfault / hyperdown.js Goto Github PK
View Code? Open in Web Editor NEWLicense: BSD 2-Clause "Simplified" License
License: BSD 2-Clause "Simplified" License
我想在浏览器端或者Node后台使用HyperDown.js,但是在引入上出现了一些问题?
请教HyperDown.js的正确使用姿势?
1、dist 683行,大写的NULL
2、如果出现换行,会出现<hnull>一级标题</hnull>
的问题
# 一级标题 #
## 二级标题 ##
### 三级标题 ###
3、hook的返回,只有下述方法返回自定义数组才正确,不应该是字符串么
converter.hook("afterParseInlineBeforeRelease", function(value){
value = value[0];
return [value];
});
4、[email protected]
无法解析
备注:
2不确定是否源码问题,因为我使用方法有略微调整,虽然感觉应该是正确的,替换其它开源类库也是ok的。
另外有个问题:源码同步sf在线版本么?感觉解析结果差别蛮大的,不过想table居中居左居右的bug倒是一样。
个人不太喜欢用国产开源项目,哪怕是bat公司的,特别是这个B,我觉得但凡做开发的都理解我的担忧。我该担忧在公司项目里使用这个类库么
最后感谢开源这么轻巧的项目
| Left-Aligned | Center Aligned | Right Aligned |
| :------------ |:---------------:| -----:|
| col 3 is | some wordy text | $1600 |
| col 2 is | centered | $12 |
| zebra stripes | are neat | $1 |
| Item | Value |
| --------- | -----:|
| Computer | $1600 |
| Phone | $12 |
| Pipe | $1 |
另外escapeBracket的返回值,应该有个默认的吧
在网站上提问页面也没有搜到oninput
等,能给个demo吗?
有没有居中的操作,个人觉得很有必要
From @hellobbq on November 7, 2015 12:23
| Left-Aligned | Center Aligned | Right Aligned |
| :------------ |:---------------:| -----:|
| col 3 is | some wordy text | $1600 |
| col 2 is | centered | $12 |
| zebra stripes | are neat | $1 |
| Item | Value |
| --------- | -----:|
| Computer | $1600 |
| Phone | $12 |
| Pipe | $1 |
找的demo,发现错误
Left-Aligned | Center Aligned | Right Aligned |
---|---|---|
col 3 is | some wordy text | $1600 |
col 2 is | centered | $12 |
zebra stripes | are neat | $1 |
Item | Value |
---|---|
Computer | $1600 |
Phone | $12 |
Pipe | $1 |
Copied from original issue: segmentfault/HyperDown#12
@Integ 浏览器中有demo吗?
|col1|col2|
|--|--|
|文本|文本\|的内容|
正常展示:
col1 | col2 |
---|---|
文本 | 文本|的内容 |
目前对于\|
没有处理,结果数据行就成3列
1、md5,就一个uniqid时用到了,是否可以考虑去掉
2、_createClass,真的有必要么?
个人觉得一个类库的话越简单越好
例如:
let str = `
# hello world
我是正文
`
let conver = new HyperDown
let output = conver.makeHTML(str)
则output生成的是一个pre标签的html代码而不会解析其内容
什么是超级html模式,有没有文档啊
=== 是一种类似于 --- 的样式,但是我发现 --- 是支持的,=== 语法却不支持
RT,只提供了text转html。不太清楚有没有html转text的函数。手册的使用说明也很少。
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.