/**
*
* showdown: https://github.com/showdownjs/showdown
*
* author: Di (微信小程序开发工程师)
* organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com)
* 垂直微信小程序开发交流社区
*
* github地址: https://github.com/icindy/wxParse
*
* for: 微信小程序富文本解析
* detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184
*/
function getDefaultOpts(simple) {
'use strict';
var defaultOptions = {
omitExtraWLInCodeBlocks: {
defaultValue: false,
describe: 'Omit the default extra whiteline added to code blocks',
type: 'boolean'
},
noHeaderId: {
defaultValue: false,
describe: 'Turn on/off generated header id',
type: 'boolean'
},
prefixHeaderId: {
defaultValue: false,
describe: 'Specify a prefix to generated header ids',
type: 'string'
},
headerLevelStart: {
defaultValue: false,
describe: 'The header blocks level start',
type: 'integer'
},
parseImgDimensions: {
defaultValue: false,
describe: 'Turn on/off image dimension parsing',
type: 'boolean'
},
simplifiedAutoLink: {
defaultValue: false,
describe: 'Turn on/off GFM autolink style',
type: 'boolean'
},
literalMidWordUnderscores: {
defaultValue: false,
describe: 'Parse midword underscores as literal underscores',
type: 'boolean'
},
strikethrough: {
defaultValue: false,
describe: 'Turn on/off strikethrough support',
type: 'boolean'
},
tables: {
defaultValue: false,
describe: 'Turn on/off tables support',
type: 'boolean'
},
tablesHeaderId: {
defaultValue: false,
describe: 'Add an id to table headers',
type: 'boolean'
},
ghCodeBlocks: {
defaultValue: true,
describe: 'Turn on/off GFM fenced code blocks support',
type: 'boolean'
},
tasklists: {
defaultValue: false,
describe: 'Turn on/off GFM tasklist support',
type: 'boolean'
},
smoothLivePreview: {
defaultValue: false,
describe: 'Prevents weird effects in live previews due to incomplete input',
type: 'boolean'
},
smartIndentationFix: {
defaultValue: false,
description: 'Tries to smartly fix identation in es6 strings',
type: 'boolean'
}
};
if (simple === false) {
return JSON.parse(JSON.stringify(defaultOptions));
}
var ret = {};
for (var opt in defaultOptions) {
if (defaultOptions.hasOwnProperty(opt)) {
ret[opt] = defaultOptions[opt].defaultValue;
}
}
return ret;
}
/**
* Created by Tivie on 06-01-2015.
*/
// Private properties
var showdown = {},
parsers = {},
extensions = {},
globalOptions = getDefaultOpts(true),
flavor = {
github: {
omitExtraWLInCodeBlocks: true,
prefixHeaderId: 'user-content-',
simplifiedAutoLink: true,
literalMidWordUnderscores: true,
strikethrough: true,
tables: true,
tablesHeaderId: true,
ghCodeBlocks: true,
tasklists: true
},
vanilla: getDefaultOpts(true)
};
/**
* helper namespace
* @type {{}}
*/
showdown.helper = {};
/**
* TODO LEGACY SUPPORT CODE
* @type {{}}
*/
showdown.extensions = {};
/**
* Set a global option
* @static
* @param {string} key
* @param {*} value
* @returns {showdown}
*/
showdown.setOption = function (key, value) {
'use strict';
globalOptions[key] = value;
return this;
};
/**
* Get a global option
* @static
* @param {string} key
* @returns {*}
*/
showdown.getOption = function (key) {
'use strict';
return globalOptions[key];
};
/**
* Get the global options
* @static
* @returns {{}}
*/
showdown.getOptions = function () {
'use strict';
return globalOptions;
};
/**
* Reset global options to the default values
* @static
*/
showdown.resetOptions = function () {
'use strict';
globalOptions = getDefaultOpts(true);
};
/**
* Set the flavor showdown should use as default
* @param {string} name
*/
showdown.setFlavor = function (name) {
'use strict';
if (flavor.hasOwnProperty(name)) {
var preset = flavor[name];
for (var option in preset) {
if (preset.hasOwnProperty(option)) {
globalOptions[option] = preset[option];
}
}
}
};
/**
* Get the default options
* @static
* @param {boolean} [simple=true]
* @returns {{}}
*/
showdown.getDefaultOptions = function (simple) {
'use strict';
return getDefaultOpts(simple);
};
/**
* Get or set a subParser
*
* subParser(name) - Get a registered subParser
* subParser(name, func) - Register a subParser
* @static
* @param {string} name
* @param {function} [func]
* @returns {*}
*/
showdown.subParser = function (name, func) {
'use strict';
if (showdown.helper.isString(name)) {
if (typeof func !== 'undefined') {
parsers[name] = func;
} else {
if (parsers.hasOwnProperty(name)) {
return parsers[name];
} else {
throw Error('SubParser named ' + name + ' not registered!');
}
}
}
};
/**
* Gets or registers an extension
* @static
* @param {string} name
* @param {object|function=} ext
* @returns {*}
*/
showdown.extension = function (name, ext) {
'use strict';
if (!showdown.helper.isString(name)) {
throw Error('Extension \'name\' must be a string');
}
name = showdown.helper.stdExtName(name);
// Getter
if (showdown.helper.isUndefined(ext)) {
if (!extensions.hasOwnProperty(name)) {
throw Error('Extension named ' + name + ' is not registered!');
}
return extensions[name];
// Setter
} else {
// Expand extension if it's wrapped in a function
if (typeof ext === 'function') {
ext = ext();
}
// Ensure extension is an array
if (!showdown.helper.isArray(ext)) {
ext = [ext];
}
var validExtension = validate(ext, name);
if (validExtension.valid) {
extensions[name] = ext;
} else {
throw Error(validExtension.error);
}
}
};
/**
* Gets all extensions registered
* @returns {{}}
*/
showdown.getAllExtensions = function () {
'use strict';
return extensions;
};
/**
* Remove an extension
* @param {string} name
*/
showdown.removeExtension = function (name) {
'use strict';
delete extensions[name];
};
/**
* Removes all extensions
*/
showdown.resetExtensions = function () {
'use strict';
extensions = {};
};
/**
* Validate extension
* @param {array} extension
* @param {string} name
* @returns {{valid: boolean, error: string}}
*/
function validate(extension, name) {
'use strict';
var errMsg = name ? 'Error in ' + name + ' extension->' : 'Error in unnamed extension',
ret = {
valid: true,
error: ''
};
if (!showdown.helper.isArray(extension)) {
extension = [extension];
}
for (var i = 0; i < extension.length; ++i) {
var baseMsg = errMsg + ' sub-extension ' + i + ': ',
ext = extension[i];
if (typeof ext !== 'object') {
ret.valid = false;
ret.error = baseMsg + 'must be an object, but ' + typeof ext + ' given';
return ret;
}
if (!showdown.helper.isString(ext.type)) {
ret.valid = false;
ret.error = baseMsg + 'property "type" must be a string, but ' + typeof ext.type + ' given';
return ret;
}
var type = ext.type = ext.type.toLowerCase();
// normalize extension type
if (type === 'language') {
type = ext.type = 'lang';
}
if (type === 'html') {
type = ext.type = 'output';
}
if (type !== 'lang' && type !== 'output' && type !== 'listener') {
ret.valid = false;
ret.error = baseMsg + 'type ' + type + ' is not recognized. Valid values: "lang/language", "output/html" or "listener"';
return ret;
}
if (type === 'listener') {
if (showdown.helper.isUndefined(ext.listeners)) {
ret.valid = false;
ret.error = baseM
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
PbootCMS是全新内核且永久开源免费的PHP企业网站开发建设管理系统,是一套高效、简洁、 强悍的可免费商用的PHP CMS源码,能够满足各类企业网站开发建设的需要。系统采用简单到想哭的模板标签,只要懂HTML就可快速开发企业网站。官方提供了大量网站模板免费下载和使用,将致力于为广大开发者和企业提供最佳的网站开发建设解决方案。 1、系统采用高效、简洁、强悍的模板标签,只要懂HTML就可快速开发企业网站; 2、系统采用PHP语言开发,使用自主研发的高速多层开发框架及缓存技术; 3、系统默认采用sqlite轻型数据库,放入PHP空间即可直接使用,可选mysql. pgsql等数据库,满足各类存储需求; 4、系统采用响应式管理后台,满足各类设备随时管理的需要; 5、系统支持后台在线升级,满足系统及时升级更新的需要; 6、系统支持内容模型、多语言、自定义表单、筛选、多条件搜索、小程序、APP等功能; 7、系统支持多种URL模式及模型、栏目、内容自定义地址名称,满足各类网站推广优化的需要;
资源推荐
资源详情
资源评论
收起资源包目录
pbootcms百度小程序源码.zip (171个子文件)
006bcbff54fac802e5f93293e72f2b654e9eb6 2KB
008189f8a3907fdbfd617dc230f3d9467f2242 666B
01fdff8652d9ab2933272930136af8fe1eba95 688B
06834f88b1f957869f300788d766931ab2f312 386B
09559f2a4b2c0baf254ce4a41f89f4a6dc43e3 3KB
0c5ad923d155750e69d943512daaa7239cefd4 360B
0fcaab3c1912ef514e69e55d9bf26cf137f68c 702B
10b453340fa07d0711bd83f8d5ad73b2149346 1KB
11d58bfcc40fbb76da926c048bcb60de59ca7d 670B
1b03b2ca75055196c35aac3c12443874634494 136B
1b4c657b9382335ae41085f40e578142001769 384B
1d60499ce2a376417c1ce020e1c534d32fa12e 1KB
1f579aefe5d6cb304da54b211b41dc87c7f386 624B
202faa89c630ca0b79d3d65c9a1c3a56113f6b 363B
208fd5cc5a19180a70bd2baf94b93fc8e469b6 635B
26dfeeb6e641a33dae4961196235bdb965b21b 17B
2ef8163bebeef49d18a495a5d12f82f854dec0 6KB
2f21d815c98503948fd7f81b897238c4937d01 385B
2f2f27586d043f2d54e5ce7833ce881cba233d 4KB
2f3efbf9ca06a44b9b71bd935846223f37ad39 610B
32c05f666efe1201ee4f877efb6234b774843e 688B
3445e27fd9b706b99c06645b6380a5b49e541f 80B
374c675be023825bcc8decf6034e3be58dc9fd 369B
3a0a17de4132cb18186659d972ce24d0ada07b 135B
4455ee4ff77419bf48a6b63da78cf7141aeea6 132B
45b1362ffef861d7b50008b6cad28d0d3247e7 360B
494ad6960f270202aafae33544c9f5775a2eb2 351B
4a2f87567445c920ce8b6ad8dd9bf0006410c6 577B
4b1936ff6c260bc07b2ca0d68edc3c89bd9755 306B
4b5130a82332a3d57d7db6b5f079569dd45110 478B
58ea207d589eb4f608e01ead405bd110994463 359B
5a1f30c35ea1758d3e94aac139e5ecfd353d3f 812B
65f3e8cf2c9e7f2a4707d1d0c51b0214daadf2 3KB
72e2df55e07965c342170e7d142e3e9ffa42f2 338B
7588d4ba6090e165e460030d7d198f4d0f2985 410B
778abfcc9493a512336c878c50ecede6729716 257B
79ba06944904ec8d294241d295e908d72bb8d1 2KB
7ab1c08cfd33e91500cc623d8a7790df216725 367B
7c19ef8fd99a0aa0e364b7cb0e7b7360f88bc1 404B
85da0d893685794e77e563bf01205d0463311c 1KB
9206d5f5f0c22535b35166da639f4c10c44d0a 22KB
9396593ef13451934ce5ff9e217a8c6317a872 307B
95a691cbdff857c84c4a3e979c489eeab0c7de 798B
97858f17e167e07f71a8cd356ef9a5fc174042 510B
9b2da6fb4b40a3f78dc95a83869abd24d44962 758B
9e17006eba9d3cd6d1f8fcdcb66d7efb76d03c 2KB
9e48335b45fc570b7a54c6c5d4db9c32e58e3b 323B
9f2f6c073ec8ae25ed478e070f8152110b8c76 2KB
a29bb1caaf23d037879b5000df9d20ad15a115 1KB
a2ce936199a9f879defba83a9d711366b751a8 350B
a5b6c3150e66c106a19acc3d3a683662818a9e 2KB
a6013044cf0482d77739b6e3aec5922f1ed531 137B
a8565867fd84756824e0132761de357667babe 202B
abb67ba4b1a3e354904d688d2c61198f2667f7 128B
ac5980636946f8378ad94439d8997a6b6376fa 458B
b0ee644d560df9ffb6afbe3147105e11af3780 2KB
b351426b22a61756775f3089772935c19bbaf2 137B
b7c5af4d34c2afd92137edd207d36b09ed2214 233B
b9978631a1a840dd33200722349a08a2fc07e9 390B
ba9ea4ce3f3a6f2fa441219c8b19ca728f921f 426B
be1863f74603cec41972d989477647f8cc9794 780B
c3fcb7d3db5cf3d5229676511deb9b0fe31821 664B
c802d3312ce64a44fd508c2ca0c6a3e059d2b3 238B
c9405d75321643bf270c6218b4c3ce6a5a09b5 134B
cb73de0bb4bd2232f1caa4aa10fa092b8f87c5 4KB
cdd14b11af0160b4079a8584d8a3cdd1d7b840 195B
config 130B
wxParse.css 4KB
index.css 1KB
newlist.css 879B
labs.css 873B
lab.css 872B
message.css 863B
newslist.css 831B
prolist.css 829B
app.css 559B
news.css 497B
pro.css 456B
contact.css 445B
about.css 433B
d3647b7f6c2d2b9caeb762d11e3df67a7ebed5 242B
d3b10c3e45a8e0b138a7b8b701838d554b94d6 136B
d58b96674d4314473e6bad30b3be4fb65116fe 699B
d68f3afb8e886dd6ec79597dcdab3b58f05cc4 3KB
da454cb9fbb709c8aeb9c41039bf1aadd116ef 202B
dbca1a4182a082e4b978669d11e45017256f55 136B
dc622e98552b8074fea99ecdf9d251685b4c06 2KB
ddfc55d9cd5329fd094cadf8cf53722400998f 2KB
description 73B
e33cdefc1f7d961369ed348f5862bc58031980 2KB
e583a895929de32806be1a7a4866bf760b30e1 314B
e731ea6a3c2d1660047e4d868bb601f3557453 1KB
e8253236fba92975d6b4c2ed620f57884e2f1d 251B
exclude 113B
f105d829b93205784e6b4f6f3ce527afeca6cb 132B
fa568558fadacf315a9ca49868de79d301547c 2KB
fa70bec8e58648499843a426118aaa5a7f04bd 158B
fbee96418724a8b5928e30896ee5455e692299 135B
ff6993216fb32bbd520e8707129d0b28900712 134B
HEAD 162B
共 171 条
- 1
- 2
资源评论
- 繁华pk落幕2022-03-05后来发现重复购买了,暂时没有用起来
- 于飞SEO2021-01-11域名/api.php,以及AIPid和密匙都设置之后,网站信息还是无法获取。源码不能用?anlih12021-02-06网站后台开启API接口,对应用户密匙填入config.js里面
anlih1
- 粉丝: 0
- 资源: 7
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Chrome代理 switchyOmega
- GVC-全球价值链参与地位指数,基于ICIO表,(Wang等 2017a)计算方法
- 易语言ADS指纹浏览器管理工具
- 易语言奇易模块5.3.6
- cad定制家具平面图工具-(FG)门板覆盖柜体
- asp.net 原生js代码及HTML实现多文件分片上传功能(自定义上传文件大小、文件上传类型)
- whl@pip install pyaudio ERROR: Failed building wheel for pyaudio
- Constantsfd密钥和权限集合.kt
- 基于Java的财务报销管理系统后端开发源码
- 基于Python核心技术的cola项目设计源码介绍
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功