From fc470d46eafa9829ae899658b95ef5f265cf85b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E6=81=92?= <2323333339@qq.com> Date: Mon, 29 Mar 2021 11:02:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typecho/write/css/joe.write.min.css | 2 +- typecho/write/css/joe.write.min.scss | 1148 +++++------ typecho/write/js/_actions.js | 541 ++--- typecho/write/js/_create.js | 10 + typecho/write/js/_tools.js | 10 + typecho/write/js/joe.parse.js | 2712 +++++++++++++------------- typecho/write/js/joe.write.chunk.js | 6 +- typecho/write/js/joe.write.js | 483 +++-- typecho/write/rollup.config.js | 12 +- 9 files changed, 2489 insertions(+), 2435 deletions(-) create mode 100644 typecho/write/js/_create.js diff --git a/typecho/write/css/joe.write.min.css b/typecho/write/css/joe.write.min.css index 4a9ddcb..1b0884c 100644 --- a/typecho/write/css/joe.write.min.css +++ b/typecho/write/css/joe.write.min.css @@ -1 +1 @@ -input[name='fields[keywords]']{width:100%}textarea[name='fields[description]'],textarea[name='fields[abstract]'],textarea[name='fields[thumb]'],textarea[name='fields[video]']{width:100%;height:80px}#text,#text ~ .resize{display:none}body.fullscreen{overflow:hidden}.cm-container{display:flex;flex-direction:column;position:relative;width:100%;height:550px;box-sizing:border-box;z-index:6666;content-visibility:auto;background:#222}.cm-container.fullscreen{position:fixed;top:0;left:0;width:100%;height:100%}.cm-container *{outline:none !important}.cm-container .cm-tools{display:flex;flex-wrap:wrap;background-color:#303133;padding:5px 0 0 5px}.cm-container .cm-tools .cm-tools-item{position:relative;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:2px;padding:5px;margin:0 5px 5px 0;transition:background 0.25s}.cm-container .cm-tools .cm-tools-item:hover{background:#393939}.cm-container .cm-tools .cm-tools-item:hover svg{fill:#efefef}.cm-container .cm-tools .cm-tools-item.active{background:#393939}.cm-container .cm-tools .cm-tools-item.active svg{fill:#efefef}.cm-container .cm-tools .cm-tools-item.active .cm-tools__dropdown{visibility:visible;opacity:1;-webkit-transform:translateX(-50%) rotateX(0);transform:translateX(-50%) rotateX(0)}.cm-container .cm-tools .cm-tools-item svg{vertical-align:middle;fill:#bfbfbf}.cm-container .cm-tools__dropdown{position:absolute;top:42px;left:50%;z-index:1000;background:#313335;padding:5px 0;border-radius:4px;visibility:hidden;-webkit-transform-origin:top;transform-origin:top;opacity:0;-webkit-transform:translateX(-50%) rotateX(-90deg);transform:translateX(-50%) rotateX(-90deg);transition:visibility 0.25s, opacity 0.25s, -webkit-transform 0.25s;transition:visibility 0.25s, transform 0.25s, opacity 0.25s;transition:visibility 0.25s, transform 0.25s, opacity 0.25s, -webkit-transform 0.25s}.cm-container .cm-tools__dropdown-item{padding:0 20px;line-height:32px;transition:background 0.25s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:15px;color:#bfbfbf;font-weight:600}.cm-container .cm-tools__dropdown-item:hover{background:#393939}.cm-container .cm-tools__dropdown::before{content:'';position:absolute;top:-7px;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #313335}.cm-container .cm-mainer{flex:1;min-height:0;display:flex;width:100%}.cm-container .cm-mainer .cm-wrap{flex-shrink:0;height:100%;flex:1;min-width:0;font-size:14px}.cm-container .cm-mainer .cm-wrap .cm-scroller{line-height:1.5;font-family:Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;-ms-scroll-chaining:none;overscroll-behavior:none}.cm-container .cm-mainer .cm-wrap .cm-scroller::-webkit-scrollbar{display:none}.cm-container .cm-mainer .cm-wrap .cm-scroller ::-moz-selection{background-color:rgba(221,240,255,0.2)}.cm-container .cm-mainer .cm-wrap .cm-scroller ::selection{background-color:rgba(221,240,255,0.2)}.cm-container .cm-mainer .cm-wrap .cm-scroller .cm-content{width:100%;white-space:pre-wrap;overflow-wrap:break-word;color:#ccc;caret-color:#ccc;padding:15px 13px 15px 11px;-webkit-user-modify:read-write-plaintext-only}.cm-container .cm-mainer .cm-wrap .cm-scroller .cm-matchingBracket{color:#8f938f;border:1px solid rgba(255,255,255,0.25);margin:-1px}.cm-container .cm-mainer .cm-wrap .cm-scroller .cm-nonmatchingBracket{color:#ff5627}.cm-container .cm-mainer .cm-resize{flex-shrink:0;height:100%;position:relative;width:16px;background:#303133;cursor:col-resize}.cm-container .cm-mainer .cm-resize::before{content:'';position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);width:4px;height:40px;border-radius:2px;background:#fff}.cm-container .cm-mainer .cm-preview{position:relative;flex-shrink:0;width:0;height:100%;background:#fff;overflow:auto;box-sizing:border-box;-ms-scroll-chaining:none;overscroll-behavior:none}.cm-container .cm-mainer .cm-preview::-webkit-scrollbar-track{background:#fff}.cm-container .cm-mainer .cm-preview::-webkit-scrollbar{width:6px;height:6px}.cm-container .cm-mainer .cm-preview::-webkit-scrollbar-thumb{border-radius:3px;background:#c0c4cc}.cm-container .cm-mainer .cm-preview .cm-preview-content{padding:20px;font-size:14px;font-family:'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;white-space:pre-wrap;overflow-wrap:break-word;color:#606266;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.cm-container .cm-mainer .cm-preview .cm-preview-content h1,.cm-container .cm-mainer .cm-preview .cm-preview-content h2,.cm-container .cm-mainer .cm-preview .cm-preview-content h3,.cm-container .cm-mainer .cm-preview .cm-preview-content h4,.cm-container .cm-mainer .cm-preview .cm-preview-content h5,.cm-container .cm-mainer .cm-preview .cm-preview-content h6{color:#303133;font-size:18px;line-height:24px;margin:0;margin-bottom:15px;position:relative}.cm-container .cm-mainer .cm-preview .cm-preview-content h1{padding:0 15px}.cm-container .cm-mainer .cm-preview .cm-preview-content h1::before{content:'';position:absolute;top:8.5px;left:0;height:7px;width:7px;border-radius:50%;background:#409eff}.cm-container .cm-mainer .cm-preview .cm-preview-content h2{padding:0 15px}.cm-container .cm-mainer .cm-preview .cm-preview-content h2::before{content:'';position:absolute;top:10%;bottom:10%;left:0;width:4px;border-radius:2px;background:#409eff}.cm-container .cm-mainer .cm-preview .cm-preview-content h3{padding:0 15px 0 20px}.cm-container .cm-mainer .cm-preview .cm-preview-content h3::before{content:'#';color:#409eff;font-weight:700;position:absolute;top:0;left:0;line-height:24px}.cm-container .cm-mainer .cm-preview .cm-preview-content h4::before{content:'「';color:#409eff;font-weight:600;margin-right:5px}.cm-container .cm-mainer .cm-preview .cm-preview-content h4::after{content:'」';color:#409eff;font-weight:600;margin-left:5px}.cm-container .cm-mainer .cm-preview .cm-preview-content h5{padding:0 15px 0 28px}.cm-container .cm-mainer .cm-preview .cm-preview-content h5::before{content:'';position:absolute;top:2px;left:0;width:20px;height:20px;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAC8klEQVRYR+3WP2gTURwH8O/vKnVRRHKXP52cBO3g4p/BqYNIhy4muajUQRBFKjQV1En6ZxJBcmlRCoJDRe3FDiJVwamLS3FwqbgIgss1l2ZQF5XeT3I1Z3NJ7u5dLlAwN9699/t97vfe7/EIO/yhHe5DD9jpCv3fFVTu856+Xzi62Y/35hj9CFPNrlUwWeRJAJfBGADwBcBNI0/PRZFdAdo4xlQLjCqKjBzogat7hZCRAgPghJGBgbFnxglAOvS7b/fLb+q+qnv5BHBCyEBAWTdnANy2IxOtWSC1qsY+1jOFwAVG+gIVvXyHQbcaKuZCxmf5iMQogXFQtEsBeO5JT6BcMu+Bcb1lUhcyqfExACUAB6JEtgUqi+U5JrrmmcyFHCjwSYtQO+tSUSFbAmXdnAdwJVASdyWLPAS2kbFA8xsHNS13EzCmlx8R6KJQcBcypfFpho3cKxRna3ADsgEo6+ZjAKMhgjZ1d2KWR2gTSyD0h4jnIB2gXDIXwciFCPZvSnMl0wwshYrJGDImaMUGKovlLBPVOrDjh8APzFx8zDkjNa7FzYoGZsKT9XEarQOHmei1aJA246cqOWW6/i2l8VMGzoWIPW/k6eq2Ja6UwCz8pw2JGZ8sS8pUz8fWau/jGp+SgLchcGBgZD1Py41NUuoI+ZloV8ZU93+ogZKzfBiWfXAPCgMJU8Y42avQdMzI4ZBfmSizocqrUeJaAmsvBZGGBCtTziXeRY1rCxRAViEhXckqK93AeQJ9kYTvlmVlqmcTdhNEtefc+9X3utVmuX+CkK6oyqtu4nwrWP8bF5IZdGYjJ79wDuMCz4D+XmhFWnZbt7ab5ltBB6mbkyAaBPFCJassuwMmNb4L4EZgXwBc4AoGTZrUeA6A9x1yK6tzzvnFDlxBv0D176kCP2TCpbbjBXCRV9DZk0VeAONCE1IQ1zWg3dlF1sFQHWQIXFeBNrLAw5BwHBZWjQl6E3SbbB8X+R4Mg/Ca0wN2WtFeBTut4B84mFI4VpekyAAAAABJRU5ErkJggg==");background-size:100% 100%}.cm-container .cm-mainer .cm-preview .cm-preview-content h6{padding:0 15px 0 28px}.cm-container .cm-mainer .cm-preview .cm-preview-content h6::before{content:'';position:absolute;top:2px;left:0;width:20px;height:20px;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAEI0lEQVRYR+3Xb2wTZRwH8G/vL22RPy5GW8fK6rJpGeFFY9RO3TRRE1HfmEAammEyjZmOSEg1RrPZaTD6xjhU/Ndlf0CZgwmD+qcgZBRIETeqY0Vcnc7pGonhRY2l3m2t5upqjq693l2vcy+8N81zz/NcPvf75fd7rjos8ku3yH34HyjK0PqlDLPzD56vMNL0VHxmpgXAoUIZXKgI3sMSpK+cNTAbylaj/9IkprnLM3+mkg8XQi4EsJ4lSL+ZNbAfVd+JG/XLcSERg3M8IAtZauBtDEkeNdN6fX9NfRqXueQiSwm00wQRMDMGw94snBJkqYBrSYIIXs/ojftqGq6IXHZRFIp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QmCC");background-size:100% 100%}.cm-container .cm-mainer .cm-preview .cm-preview-content hr{margin:0;border:none;height:1px;background-color:#e4e7ed;margin-bottom:15px}.cm-container .cm-mainer .cm-preview .cm-preview-content p{line-height:26px;margin:0;margin-bottom:15px}.cm-container .cm-mainer .cm-preview .cm-preview-content blockquote{margin:0;line-height:26px;margin-bottom:15px;background:#ecf8ff;border-left:5px solid #50bfff;color:#50bfff;padding:8px 15px;border-radius:0 4px 4px 0}.cm-container .cm-mainer .cm-preview .cm-preview-content blockquote p{margin:0}.cm-container .cm-mainer .cm-preview .cm-preview-content pre{margin:0;margin-bottom:15px}.cm-container .cm-mainer .cm-preview .cm-preview-content pre::-webkit-scrollbar-track{background:#fff}.cm-container .cm-mainer .cm-preview .cm-preview-content pre::-webkit-scrollbar{width:6px;height:6px}.cm-container .cm-mainer .cm-preview .cm-preview-content pre::-webkit-scrollbar-thumb{border-radius:3px;background:#c0c4cc}.cm-container .cm-mainer .cm-preview .cm-preview-content p code{display:inline-block;min-height:26px;line-height:26px;border-radius:4px;font-size:12px;background:#fdf6ec;padding:0 8px;color:#e6a23c;vertical-align:top}.cm-container .cm-mainer .cm-preview .cm-preview-content ol,.cm-container .cm-mainer .cm-preview .cm-preview-content ul{margin:0;margin-bottom:15px;padding-left:36px}.cm-container .cm-mainer .cm-preview .cm-preview-content ol li,.cm-container .cm-mainer .cm-preview .cm-preview-content ul li{line-height:26px}.cm-container .cm-mainer .cm-preview .cm-preview-content ol li{list-style:decimal}.cm-container .cm-mainer .cm-preview .cm-preview-content ul li{list-style:disc}.cm-container .cm-mainer .cm-preview .cm-preview-content table{width:100%;max-width:100%;table-layout:fixed;color:#909399;margin-bottom:15px;font-size:13px;border-top:1px solid #ebeef5;border-left:1px solid #ebeef5;border-collapse:collapse}.cm-container .cm-mainer .cm-preview .cm-preview-content table td,.cm-container .cm-mainer .cm-preview .cm-preview-content table th{padding:8px;border-bottom:1px solid #ebeef5;border-right:1px solid #ebeef5}.cm-container .cm-mainer .cm-preview .cm-preview-content table thead th{font-weight:500;background:#ebeef5}.cm-container .cm-mainer .cm-preview .cm-preview-content img{display:block;max-width:100%;border-radius:4px;transition:box-shadow 0.35s, -webkit-transform 0.35s;transition:transform 0.35s, box-shadow 0.35s;transition:transform 0.35s, box-shadow 0.35s, -webkit-transform 0.35s;margin:0 auto}.cm-container .cm-mainer .cm-preview .cm-preview-content a{display:inline-block;line-height:26px;color:#409eff;position:relative;text-decoration:none}.cm-container .cm-progress-left{position:absolute;top:0;right:50%;width:0;height:3px;background-color:#ff5627;transition:width 0.5s;z-index:1}.cm-container .cm-progress-right{position:absolute;top:0;left:50%;width:0;height:3px;background-color:#ff5627;transition:width 0.5s;z-index:1}.cm-modal{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;right:0;bottom:0;z-index:9999;background:rgba(0,0,0,0);visibility:hidden;transition:background 0.25s, visibility 0.25s;will-change:background, visibility}.cm-modal__wrapper{width:380px;background:#fff;color:#606266;border-radius:4px;opacity:0;-webkit-transform:translateY(-30%);transform:translateY(-30%);transition:opacity 0.25s, -webkit-transform 0.25s;transition:opacity 0.25s, transform 0.25s;transition:opacity 0.25s, transform 0.25s, -webkit-transform 0.25s}.cm-modal__wrapper-header{padding:10px 20px;border-bottom:1px solid #e4e7ed;display:flex;align-items:center;justify-content:space-between}.cm-modal__wrapper-header--close{font-size:20px;cursor:pointer}.cm-modal__wrapper-bodyer{padding:20px}.cm-modal__wrapper-bodyer .fitem{display:flex;align-items:center;margin-bottom:15px}.cm-modal__wrapper-bodyer .fitem:last-child{margin-bottom:0}.cm-modal__wrapper-bodyer .fitem label{margin-right:10px}.cm-modal__wrapper-bodyer .fitem input{width:auto;flex:1;-webkit-appearance:none;outline:none;border:1px solid #dcdfe6;height:34px;box-sizing:border-box;padding:0 10px;border-radius:3px;color:#606266}.cm-modal__wrapper-bodyer .tabbar{position:relative;width:100%;overflow-x:auto;display:flex;margin-bottom:20px}.cm-modal__wrapper-bodyer .tabbar::-webkit-scrollbar{display:none}.cm-modal__wrapper-bodyer .tabbar-item{white-space:nowrap;margin-right:15px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.cm-modal__wrapper-bodyer .tabbar-item:last-child{margin-right:0}.cm-modal__wrapper-bodyer .tabbar-item.active{color:#409eff}.cm-modal__wrapper-bodyer .lists{display:none;grid-template-columns:repeat(6, 1fr);font-size:18px;border-left:1px solid #e4e7ed;border-top:1px solid #e4e7ed;font-family:'Meiryo UI', 'Microsoft YaHei', 'Malgun Gothic', 'Segoe UI', 'Trebuchet MS', Helvetica, 'Monaco', monospace, Tahoma, STXihei, '华文细黑', STHeiti, 'Helvetica Neue', 'Droid Sans', 'wenquanyi micro hei', FreeSans, Arimo, Arial, SimSun, '宋体', Heiti, '黑体', sans-serif;max-height:380px;overflow-y:auto;-ms-scroll-chaining:none;overscroll-behavior:none}.cm-modal__wrapper-bodyer .lists::-webkit-scrollbar-track{background:#fff}.cm-modal__wrapper-bodyer .lists::-webkit-scrollbar{width:6px;height:6px}.cm-modal__wrapper-bodyer .lists::-webkit-scrollbar-thumb{border-radius:3px;background:#c0c4cc}.cm-modal__wrapper-bodyer .lists.active{display:grid}.cm-modal__wrapper-bodyer .lists-item{display:flex;align-items:center;justify-content:center;border-right:1px solid #e4e7ed;border-bottom:1px solid #e4e7ed;cursor:pointer;transition:background 0.25s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:#888;padding:5px 0}.cm-modal__wrapper-bodyer .lists-item:hover,.cm-modal__wrapper-bodyer .lists-item .active{background:#e4e7ed}.cm-modal__wrapper-footer{display:flex;align-items:center;justify-content:flex-end;padding:0 20px 10px}.cm-modal__wrapper-footer--cancle,.cm-modal__wrapper-footer--confirm{cursor:pointer;border:none;outline:none;margin-left:5px;background:#fff;color:#606266;-webkit-appearance:none;padding:7px 15px;border-radius:3px}.cm-modal__wrapper-footer--confirm{color:#fff;background:#409eff}.cm-modal.active{visibility:visible;background:rgba(0,0,0,0.75)}.cm-modal.active .cm-modal__wrapper{-webkit-transform:translateY(0);transform:translateY(0);opacity:1}@media (max-width: 768px){.cm-modal__wrapper{width:90%}} +input[name='fields[keywords]']{width:100%}textarea[name='fields[description]'],textarea[name='fields[abstract]'],textarea[name='fields[thumb]'],textarea[name='fields[video]']{width:100%;height:80px}#text,#text ~ .resize{display:none}body.fullscreen{overflow:hidden}.cm-container{display:flex;flex-direction:column;position:relative;width:100%;height:550px;box-sizing:border-box;z-index:6666;content-visibility:auto;background:#222}.cm-container.fullscreen{position:fixed;top:0;left:0;width:100%;height:100%}.cm-container *{outline:none !important}.cm-container .cm-tools{display:flex;flex-wrap:wrap;background-color:#303133;padding:5px 0 0 5px}.cm-container .cm-tools .cm-tools-item{position:relative;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:2px;padding:5px;margin:0 5px 5px 0;transition:background 0.25s}.cm-container .cm-tools .cm-tools-item:hover{background:#393939}.cm-container .cm-tools .cm-tools-item:hover svg{fill:#efefef}.cm-container .cm-tools .cm-tools-item.active{background:#393939}.cm-container .cm-tools .cm-tools-item.active svg{fill:#efefef}.cm-container .cm-tools .cm-tools-item.active .cm-tools__dropdown{visibility:visible;opacity:1;-webkit-transform:translateX(-50%) rotateX(0);transform:translateX(-50%) rotateX(0)}.cm-container .cm-tools .cm-tools-item svg{vertical-align:middle;fill:#bfbfbf}.cm-container .cm-tools__dropdown{position:absolute;top:42px;left:50%;z-index:1000;background:#313335;padding:5px 0;border-radius:4px;visibility:hidden;-webkit-transform-origin:top;transform-origin:top;opacity:0;-webkit-transform:translateX(-50%) rotateX(-90deg);transform:translateX(-50%) rotateX(-90deg);transition:visibility 0.25s, opacity 0.25s, -webkit-transform 0.25s;transition:visibility 0.25s, transform 0.25s, opacity 0.25s;transition:visibility 0.25s, transform 0.25s, opacity 0.25s, -webkit-transform 0.25s}.cm-container .cm-tools__dropdown-item{padding:0 20px;line-height:32px;transition:background 0.25s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:15px;color:#bfbfbf;font-weight:600}.cm-container .cm-tools__dropdown-item:hover{background:#393939}.cm-container .cm-tools__dropdown::before{content:'';position:absolute;top:-7px;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #313335}.cm-container .cm-mainer{flex:1;min-height:0;display:flex;width:100%}.cm-container .cm-mainer .cm-wrap{flex-shrink:0;height:100%;flex:1;min-width:0;font-size:14px}.cm-container .cm-mainer .cm-wrap .cm-scroller{line-height:1.5;font-family:Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;-ms-scroll-chaining:none;overscroll-behavior:none}.cm-container .cm-mainer .cm-wrap .cm-scroller::-webkit-scrollbar{display:none}.cm-container .cm-mainer .cm-wrap .cm-scroller ::-moz-selection{background-color:rgba(221,240,255,0.2)}.cm-container .cm-mainer .cm-wrap .cm-scroller ::selection{background-color:rgba(221,240,255,0.2)}.cm-container .cm-mainer .cm-wrap .cm-scroller .cm-content{width:100%;white-space:pre-wrap;overflow-wrap:break-word;color:#ccc;caret-color:#ccc;padding:15px 13px 15px 11px;-webkit-user-modify:read-write-plaintext-only}.cm-container .cm-mainer .cm-wrap .cm-scroller .cm-matchingBracket{color:#8f938f;border:1px solid rgba(255,255,255,0.25);margin:-1px}.cm-container .cm-mainer .cm-wrap .cm-scroller .cm-nonmatchingBracket{color:#ff5627}.cm-container .cm-mainer .cm-resize{flex-shrink:0;height:100%;position:relative;width:16px;background:#303133;cursor:col-resize}.cm-container .cm-mainer .cm-resize::before{content:'';position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);width:4px;height:40px;border-radius:2px;background:#fff}.cm-container .cm-mainer .cm-preview{position:relative;flex-shrink:0;width:0;height:100%;background:#fff;overflow:auto;box-sizing:border-box;-ms-scroll-chaining:none;overscroll-behavior:none}.cm-container .cm-mainer .cm-preview::-webkit-scrollbar-track{background:#fff}.cm-container .cm-mainer .cm-preview::-webkit-scrollbar{width:6px;height:6px}.cm-container .cm-mainer .cm-preview::-webkit-scrollbar-thumb{border-radius:3px;background:#c0c4cc}.cm-container .cm-mainer .cm-preview .cm-preview-content{padding:20px;font-size:14px;font-family:'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;white-space:pre-wrap;overflow-wrap:break-word;color:#606266;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.cm-container .cm-mainer .cm-preview .cm-preview-content h1,.cm-container .cm-mainer .cm-preview .cm-preview-content h2,.cm-container .cm-mainer .cm-preview .cm-preview-content h3,.cm-container .cm-mainer .cm-preview .cm-preview-content h4,.cm-container .cm-mainer .cm-preview .cm-preview-content h5,.cm-container .cm-mainer .cm-preview .cm-preview-content h6{color:#303133;font-size:18px;line-height:24px;margin:0;margin-bottom:15px;position:relative}.cm-container .cm-mainer .cm-preview .cm-preview-content h1{padding:0 15px}.cm-container .cm-mainer .cm-preview .cm-preview-content h1::before{content:'';position:absolute;top:8.5px;left:0;height:7px;width:7px;border-radius:50%;background:#409eff}.cm-container .cm-mainer .cm-preview .cm-preview-content h2{padding:0 15px}.cm-container .cm-mainer .cm-preview .cm-preview-content h2::before{content:'';position:absolute;top:10%;bottom:10%;left:0;width:4px;border-radius:2px;background:#409eff}.cm-container .cm-mainer .cm-preview .cm-preview-content h3{padding:0 15px 0 20px}.cm-container .cm-mainer .cm-preview .cm-preview-content h3::before{content:'#';color:#409eff;font-weight:700;position:absolute;top:0;left:0;line-height:24px}.cm-container .cm-mainer .cm-preview .cm-preview-content h4::before{content:'「';color:#409eff;font-weight:600;margin-right:5px}.cm-container .cm-mainer .cm-preview .cm-preview-content h4::after{content:'」';color:#409eff;font-weight:600;margin-left:5px}.cm-container .cm-mainer .cm-preview .cm-preview-content h5{padding:0 15px 0 28px}.cm-container .cm-mainer .cm-preview .cm-preview-content h5::before{content:'';position:absolute;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Mg/Ca0wN2WtFeBTut4B84mFI4VpekyAAAAABJRU5ErkJggg==");background-size:100% 100%}.cm-container .cm-mainer .cm-preview .cm-preview-content h6{padding:0 15px 0 28px}.cm-container .cm-mainer .cm-preview .cm-preview-content h6::before{content:'';position:absolute;top:2px;left:0;width:20px;height:20px;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAEI0lEQVRYR+3Xb2wTZRwH8G/vL22RPy5GW8fK6rJpGeFFY9RO3TRRE1HfmEAammEyjZmOSEg1RrPZaTD6xjhU/Ndlf0CZgwmD+qcgZBRIETeqY0Vcnc7pGonhRY2l3m2t5upqjq693l2vcy+8N81zz/NcPvf75fd7rjos8ku3yH34HyjK0PqlDLPzD56vMNL0VHxmpgXAoUIZXKgI3sMSpK+cNTAbylaj/9IkprnLM3+mkg8XQi4EsJ4lSL+ZNbAfVd+JG/XLcSERg3M8IAtZauBtDEkeNdN6fX9NfRqXueQiSwm00wQRMDMGw94snBJkqYBrSYIIXs/ojftqGq6IXHZRFIpkKYC2JSw9SJE663W0nthlqcMawwrJYpVCag1M48pNy1YNvLWRffGNIYSCv6Cnog7rjCtVIbUEXoG7qeqaNMj51F58dWoKPZY62JeWyUJG+ctcIplcIizWCpgTl9EIyODJn9BtceDWq/6B57tO/H4R688fFaZ7AWzWAiiJEyMDx39Ed6UDdyy7Ni/w1ekxbP95VJi/F8CRYoGycGLksaEJdFU6cPdy0zxkR/RbtE6FhPvHATQUm2JFODHSfyyCLmsd7lth/hf53q/jcE8OC+NTAG7PTKiNoCqcGPnpF+PotDrwwNXl+OC3H9A8cVqYPgPgFnFo1QCLwomRg4cvoPMGBzZHTgq3zwKwZ+ddKVATXAZhf+gdnPvuojAUqmJdrspRAtQU93pXEM+8clgwhQHU5itruUBNcTt6TsP9sl8weQC0S/VFOUBNcW/2folt2z+XhZPTZh6kSKJ79aqVRuFszRxfUm8sNbdz9xlsfekz2bhCQBvDMMM8z+ubN92Mjrb71brS+97dM4wtnk8U4SSBBEGErVarzeVywePxoHVLA1pb6lUh3+8bwZMv+BTjpIAVACa9Xq+uqakJ7e3tqpGd/WfR3Jr+81awIJS0mY0A+sLhMGw2W3qfGmTXvhAef/6gapxUBDuqqqoejUQiBvFbKUH2DHyNx54bLAqXF0jT9HBjY6Pd6/XOi7oc5K7936Dp2QNF4/IBrTqdLuLxeIi2tracRSGF/PDgKB55er8muHzATQB2m81m+P1+1NbmPoVyIfsOnUOj+2PNcPmAO1iWbeE4TmexWODz+WQhayrL4No2oCkuJ5Bl2VGO49ZmcisXObdeVSuRaq7ZZ3G10KBTqRQl3pQPGY1GEQgE4HQ6heVDAO5S1cklNmUDXQRB9KZSqXkfESaTCW63G7FYDKFQKDEyMoJoNKqfe/bbAJ7QGpcrxa8xDLOV5/k0kGXZv2ZnZ5FMJtNjmqYvURR1IpFInAcwAeD7ud/pUuDmAY1G41g8Hl9DkmScoqggx3FHAIyJMMlSQfI9V5zKagDC93dsoRFKimQx2dIWOV/U/yn6bx0WyDj8vgLOAAAAAElFTkSuQmCC");background-size:100% 100%}.cm-container .cm-mainer .cm-preview .cm-preview-content hr{margin:0;border:none;height:1px;background-color:#e4e7ed;margin-bottom:15px}.cm-container .cm-mainer .cm-preview .cm-preview-content p{line-height:26px;margin:0;margin-bottom:15px}.cm-container .cm-mainer .cm-preview .cm-preview-content blockquote{margin:0;line-height:26px;margin-bottom:15px;background:#ecf8ff;border-left:5px solid #50bfff;color:#50bfff;padding:8px 15px;border-radius:0 4px 4px 0}.cm-container .cm-mainer .cm-preview .cm-preview-content blockquote p{margin:0}.cm-container .cm-mainer .cm-preview .cm-preview-content pre{margin:0;margin-bottom:15px}.cm-container .cm-mainer .cm-preview .cm-preview-content pre::-webkit-scrollbar-track{background:#fff}.cm-container .cm-mainer .cm-preview .cm-preview-content pre::-webkit-scrollbar{width:6px;height:6px}.cm-container .cm-mainer .cm-preview .cm-preview-content pre::-webkit-scrollbar-thumb{border-radius:3px;background:#c0c4cc}.cm-container .cm-mainer .cm-preview .cm-preview-content p code{display:inline-block;min-height:26px;line-height:26px;border-radius:4px;font-size:12px;background:#fdf6ec;padding:0 8px;color:#e6a23c;vertical-align:top}.cm-container .cm-mainer .cm-preview .cm-preview-content ol,.cm-container .cm-mainer .cm-preview .cm-preview-content ul{margin:0;margin-bottom:15px;padding-left:36px}.cm-container .cm-mainer .cm-preview .cm-preview-content ol li,.cm-container .cm-mainer .cm-preview .cm-preview-content ul li{line-height:26px}.cm-container .cm-mainer .cm-preview .cm-preview-content ol li{list-style:decimal}.cm-container .cm-mainer .cm-preview .cm-preview-content ul li{list-style:disc}.cm-container .cm-mainer .cm-preview .cm-preview-content table{width:100%;max-width:100%;table-layout:fixed;color:#909399;margin-bottom:15px;font-size:13px;border-top:1px solid #ebeef5;border-left:1px solid #ebeef5;border-collapse:collapse}.cm-container .cm-mainer .cm-preview .cm-preview-content table td,.cm-container .cm-mainer .cm-preview .cm-preview-content table th{padding:8px;border-bottom:1px solid #ebeef5;border-right:1px solid #ebeef5}.cm-container .cm-mainer .cm-preview .cm-preview-content table thead th{font-weight:500;background:#ebeef5}.cm-container .cm-mainer .cm-preview .cm-preview-content img{display:block;max-width:100%;border-radius:4px;transition:box-shadow 0.35s, -webkit-transform 0.35s;transition:transform 0.35s, box-shadow 0.35s;transition:transform 0.35s, box-shadow 0.35s, -webkit-transform 0.35s;margin:0 auto}.cm-container .cm-mainer .cm-preview .cm-preview-content a{display:inline-block;line-height:26px;color:#409eff;position:relative;text-decoration:none}.cm-container .cm-mainer .cm-preview .cm-preview-content .task{-webkit-appearance:none;position:relative;border-radius:2px;width:15px;height:15px;border:2px solid #409eff;vertical-align:-3px;box-sizing:border-box;margin:0}.cm-container .cm-mainer .cm-preview .cm-preview-content .task:disabled{cursor:not-allowed}.cm-container .cm-mainer .cm-preview .cm-preview-content .task:checked{border:none;background:#409eff}.cm-container .cm-mainer .cm-preview .cm-preview-content .task:checked::after{content:'';width:3px;height:7px;position:absolute;top:2px;left:5px;border:2px solid #fff;border-top:0;border-left:0;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.cm-container .cm-progress-left{position:absolute;top:0;right:50%;width:0;height:3px;background-color:#ff5627;transition:width 0.5s;z-index:1}.cm-container .cm-progress-right{position:absolute;top:0;left:50%;width:0;height:3px;background-color:#ff5627;transition:width 0.5s;z-index:1}.cm-modal{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;right:0;bottom:0;z-index:9999;background:rgba(0,0,0,0);visibility:hidden;transition:background 0.25s, visibility 0.25s;will-change:background, visibility}.cm-modal__wrapper{width:380px;background:#fff;color:#606266;border-radius:4px;opacity:0;-webkit-transform:translateY(-30%);transform:translateY(-30%);transition:opacity 0.25s, -webkit-transform 0.25s;transition:opacity 0.25s, transform 0.25s;transition:opacity 0.25s, transform 0.25s, -webkit-transform 0.25s}.cm-modal__wrapper-header{padding:10px 20px;border-bottom:1px solid #e4e7ed;display:flex;align-items:center;justify-content:space-between}.cm-modal__wrapper-header--close{font-size:20px;cursor:pointer}.cm-modal__wrapper-bodyer{padding:20px}.cm-modal__wrapper-bodyer .fitem{display:flex;align-items:center;margin-bottom:15px}.cm-modal__wrapper-bodyer .fitem:last-child{margin-bottom:0}.cm-modal__wrapper-bodyer .fitem label{margin-right:10px}.cm-modal__wrapper-bodyer .fitem input{width:auto;flex:1;-webkit-appearance:none;outline:none;border:1px solid #dcdfe6;height:34px;box-sizing:border-box;padding:0 10px;border-radius:3px;color:#606266}.cm-modal__wrapper-bodyer .tabbar{position:relative;width:100%;overflow-x:auto;display:flex;margin-bottom:20px}.cm-modal__wrapper-bodyer .tabbar::-webkit-scrollbar{display:none}.cm-modal__wrapper-bodyer .tabbar-item{white-space:nowrap;margin-right:15px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.cm-modal__wrapper-bodyer .tabbar-item:last-child{margin-right:0}.cm-modal__wrapper-bodyer .tabbar-item.active{color:#409eff}.cm-modal__wrapper-bodyer .lists{display:none;grid-template-columns:repeat(6, 1fr);font-size:18px;border-left:1px solid #e4e7ed;border-top:1px solid #e4e7ed;font-family:'Meiryo UI', 'Microsoft YaHei', 'Malgun Gothic', 'Segoe UI', 'Trebuchet MS', Helvetica, 'Monaco', monospace, Tahoma, STXihei, '华文细黑', STHeiti, 'Helvetica Neue', 'Droid Sans', 'wenquanyi micro hei', FreeSans, Arimo, Arial, SimSun, '宋体', Heiti, '黑体', sans-serif;max-height:350px;overflow-y:auto;-ms-scroll-chaining:none;overscroll-behavior:none}.cm-modal__wrapper-bodyer .lists::-webkit-scrollbar-track{background:#fff}.cm-modal__wrapper-bodyer .lists::-webkit-scrollbar{width:6px;height:6px}.cm-modal__wrapper-bodyer .lists::-webkit-scrollbar-thumb{border-radius:3px;background:#c0c4cc}.cm-modal__wrapper-bodyer .lists.active{display:grid}.cm-modal__wrapper-bodyer .lists-item{display:flex;align-items:center;justify-content:center;border-right:1px solid #e4e7ed;border-bottom:1px solid #e4e7ed;cursor:pointer;transition:background 0.25s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:#888;padding:5px 0}.cm-modal__wrapper-bodyer .lists-item:hover,.cm-modal__wrapper-bodyer .lists-item .active{background:#e4e7ed}.cm-modal__wrapper-footer{display:flex;align-items:center;justify-content:flex-end;padding:0 20px 10px}.cm-modal__wrapper-footer--cancle,.cm-modal__wrapper-footer--confirm{cursor:pointer;border:none;outline:none;margin-left:5px;background:#fff;color:#606266;-webkit-appearance:none;padding:7px 15px;border-radius:3px}.cm-modal__wrapper-footer--confirm{color:#fff;background:#409eff}.cm-modal.active{visibility:visible;background:rgba(0,0,0,0.75)}.cm-modal.active .cm-modal__wrapper{-webkit-transform:translateY(0);transform:translateY(0);opacity:1}@media (max-width: 768px){.cm-modal__wrapper{width:90%}} diff --git a/typecho/write/css/joe.write.min.scss b/typecho/write/css/joe.write.min.scss index d870d85..9ac5f87 100644 --- a/typecho/write/css/joe.write.min.scss +++ b/typecho/write/css/joe.write.min.scss @@ -1,584 +1,614 @@ input[name='fields[keywords]'] { - width: 100%; + width: 100%; } textarea[name='fields[description]'], textarea[name='fields[abstract]'], textarea[name='fields[thumb]'], textarea[name='fields[video]'] { - width: 100%; - height: 80px; + width: 100%; + height: 80px; } #text, #text ~ .resize { - display: none; + display: none; } body.fullscreen { - overflow: hidden; + overflow: hidden; } .cm-container { - display: flex; - flex-direction: column; - position: relative; - width: 100%; - height: 550px; - box-sizing: border-box; - z-index: 6666; - content-visibility: auto; - background: #222; - &.fullscreen { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - } - * { - outline: none !important; - } - .cm-tools { - display: flex; - flex-wrap: wrap; - background-color: #303133; - padding: 5px 0 0 5px; - .cm-tools-item { - position: relative; - cursor: pointer; - display: flex; - align-items: center; - justify-content: center; - border-radius: 2px; - padding: 5px; - margin: 0 5px 5px 0; - transition: background 0.25s; - &:hover { - background: #393939; - svg { - fill: #efefef; - } - } - &.active { - background: #393939; - svg { - fill: #efefef; - } - .cm-tools__dropdown { - visibility: visible; - opacity: 1; - transform: translateX(-50%) rotateX(0); - } - } - svg { - vertical-align: middle; - fill: #bfbfbf; - } - } - &__dropdown { - position: absolute; - top: 42px; - left: 50%; - z-index: 1000; - background: #313335; - padding: 5px 0; - border-radius: 4px; - visibility: hidden; - transform-origin: top; - opacity: 0; - transform: translateX(-50%) rotateX(-90deg); - transition: visibility 0.25s, transform 0.25s, opacity 0.25s; - &-item { - padding: 0 20px; - line-height: 32px; - transition: background 0.25s; - user-select: none; - font-size: 15px; - color: #bfbfbf; - font-weight: 600; - &:hover { - background: #393939; - } - } - &::before { - content: ''; - position: absolute; - top: -7px; - left: 50%; - transform: translateX(-50%); - width: 0; - height: 0; - border-left: 7px solid transparent; - border-right: 7px solid transparent; - border-bottom: 7px solid #313335; - } - } - } - .cm-mainer { - flex: 1; - min-height: 0; - display: flex; - width: 100%; - .cm-wrap { - flex-shrink: 0; - height: 100%; - flex: 1; - min-width: 0; - font-size: 14px; - .cm-scroller { - line-height: 1.5; - font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; - overscroll-behavior: none; - &::-webkit-scrollbar { - display: none; - } - ::selection { - background-color: rgba(221, 240, 255, 0.2); - } - .cm-content { - width: 100%; - white-space: pre-wrap; - overflow-wrap: break-word; - color: #ccc; - caret-color: #ccc; - padding: 15px 13px 15px 11px; - -webkit-user-modify: read-write-plaintext-only; - } - .cm-matchingBracket { - color: #8f938f; - border: 1px solid rgba(255, 255, 255, 0.25); - margin: -1px; - } - .cm-nonmatchingBracket { - color: #ff5627; - } - } - } - .cm-resize { - flex-shrink: 0; - height: 100%; - position: relative; - width: 16px; - background: #303133; - cursor: col-resize; - &::before { - content: ''; - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - width: 4px; - height: 40px; - border-radius: 2px; - background: #fff; - } - } - .cm-preview { - position: relative; - flex-shrink: 0; - width: 0; - height: 100%; - background: #fff; - overflow: auto; - box-sizing: border-box; - overscroll-behavior: none; - &::-webkit-scrollbar-track { - background: #fff; - } - &::-webkit-scrollbar { - width: 6px; - height: 6px; - } - &::-webkit-scrollbar-thumb { - border-radius: 3px; - background: #c0c4cc; - } - .cm-preview-content { - padding: 20px; - font-size: 14px; - font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif; - white-space: pre-wrap; - overflow-wrap: break-word; - color: #606266; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - h1, - h2, - h3, - h4, - h5, - h6 { - color: #303133; - font-size: 18px; - line-height: 24px; + display: flex; + flex-direction: column; + position: relative; + width: 100%; + height: 550px; + box-sizing: border-box; + z-index: 6666; + content-visibility: auto; + background: #222; + &.fullscreen { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + } + * { + outline: none !important; + } + .cm-tools { + display: flex; + flex-wrap: wrap; + background-color: #303133; + padding: 5px 0 0 5px; + .cm-tools-item { + position: relative; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + border-radius: 2px; + padding: 5px; + margin: 0 5px 5px 0; + transition: background 0.25s; + &:hover { + background: #393939; + svg { + fill: #efefef; + } + } + &.active { + background: #393939; + svg { + fill: #efefef; + } + .cm-tools__dropdown { + visibility: visible; + opacity: 1; + transform: translateX(-50%) rotateX(0); + } + } + svg { + vertical-align: middle; + fill: #bfbfbf; + } + } + &__dropdown { + position: absolute; + top: 42px; + left: 50%; + z-index: 1000; + background: #313335; + padding: 5px 0; + border-radius: 4px; + visibility: hidden; + transform-origin: top; + opacity: 0; + transform: translateX(-50%) rotateX(-90deg); + transition: visibility 0.25s, transform 0.25s, opacity 0.25s; + &-item { + padding: 0 20px; + line-height: 32px; + transition: background 0.25s; + user-select: none; + font-size: 15px; + color: #bfbfbf; + font-weight: 600; + &:hover { + background: #393939; + } + } + &::before { + content: ''; + position: absolute; + top: -7px; + left: 50%; + transform: translateX(-50%); + width: 0; + height: 0; + border-left: 7px solid transparent; + border-right: 7px solid transparent; + border-bottom: 7px solid #313335; + } + } + } + .cm-mainer { + flex: 1; + min-height: 0; + display: flex; + width: 100%; + .cm-wrap { + flex-shrink: 0; + height: 100%; + flex: 1; + min-width: 0; + font-size: 14px; + .cm-scroller { + line-height: 1.5; + font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; + overscroll-behavior: none; + &::-webkit-scrollbar { + display: none; + } + ::selection { + background-color: rgba(221, 240, 255, 0.2); + } + .cm-content { + width: 100%; + white-space: pre-wrap; + overflow-wrap: break-word; + color: #ccc; + caret-color: #ccc; + padding: 15px 13px 15px 11px; + -webkit-user-modify: read-write-plaintext-only; + } + .cm-matchingBracket { + color: #8f938f; + border: 1px solid rgba(255, 255, 255, 0.25); + margin: -1px; + } + .cm-nonmatchingBracket { + color: #ff5627; + } + } + } + .cm-resize { + flex-shrink: 0; + height: 100%; + position: relative; + width: 16px; + background: #303133; + cursor: col-resize; + &::before { + content: ''; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + width: 4px; + height: 40px; + border-radius: 2px; + background: #fff; + } + } + .cm-preview { + position: relative; + flex-shrink: 0; + width: 0; + height: 100%; + background: #fff; + overflow: auto; + box-sizing: border-box; + overscroll-behavior: none; + &::-webkit-scrollbar-track { + background: #fff; + } + &::-webkit-scrollbar { + width: 6px; + height: 6px; + } + &::-webkit-scrollbar-thumb { + border-radius: 3px; + background: #c0c4cc; + } + .cm-preview-content { + padding: 20px; + font-size: 14px; + font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif; + white-space: pre-wrap; + overflow-wrap: break-word; + color: #606266; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + h1, + h2, + h3, + h4, + h5, + h6 { + color: #303133; + font-size: 18px; + line-height: 24px; + margin: 0; + margin-bottom: 15px; + position: relative; + } + h1 { + padding: 0 15px; + &::before { + content: ''; + position: absolute; + top: 8.5px; + left: 0; + height: 7px; + width: 7px; + border-radius: 50%; + background: #409eff; + } + } + h2 { + padding: 0 15px; + &::before { + content: ''; + position: absolute; + top: 10%; + bottom: 10%; + left: 0; + width: 4px; + border-radius: 2px; + background: #409eff; + } + } + h3 { + padding: 0 15px 0 20px; + &::before { + content: '#'; + color: #409eff; + font-weight: 700; + position: absolute; + top: 0; + left: 0; + line-height: 24px; + } + } + h4 { + &::before { + content: '「'; + color: #409eff; + font-weight: 600; + margin-right: 5px; + } + &::after { + content: '」'; + color: #409eff; + font-weight: 600; + margin-left: 5px; + } + } + h5 { + padding: 0 15px 0 28px; + &::before { + content: ''; + position: absolute; + top: 2px; + left: 0; + width: 20px; + height: 20px; + background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAC8klEQVRYR+3WP2gTURwH8O/vKnVRRHKXP52cBO3g4p/BqYNIhy4muajUQRBFKjQV1En6ZxJBcmlRCoJDRe3FDiJVwamLS3FwqbgIgss1l2ZQF5XeT3I1Z3NJ7u5dLlAwN9699/t97vfe7/EIO/yhHe5DD9jpCv3fFVTu856+Xzi62Y/35hj9CFPNrlUwWeRJAJfBGADwBcBNI0/PRZFdAdo4xlQLjCqKjBzogat7hZCRAgPghJGBgbFnxglAOvS7b/fLb+q+qnv5BHBCyEBAWTdnANy2IxOtWSC1qsY+1jOFwAVG+gIVvXyHQbcaKuZCxmf5iMQogXFQtEsBeO5JT6BcMu+Bcb1lUhcyqfExACUAB6JEtgUqi+U5JrrmmcyFHCjwSYtQO+tSUSFbAmXdnAdwJVASdyWLPAS2kbFA8xsHNS13EzCmlx8R6KJQcBcypfFpho3cKxRna3ADsgEo6+ZjAKMhgjZ1d2KWR2gTSyD0h4jnIB2gXDIXwciFCPZvSnMl0wwshYrJGDImaMUGKovlLBPVOrDjh8APzFx8zDkjNa7FzYoGZsKT9XEarQOHmei1aJA246cqOWW6/i2l8VMGzoWIPW/k6eq2Ja6UwCz8pw2JGZ8sS8pUz8fWau/jGp+SgLchcGBgZD1Py41NUuoI+ZloV8ZU93+ogZKzfBiWfXAPCgMJU8Y42avQdMzI4ZBfmSizocqrUeJaAmsvBZGGBCtTziXeRY1rCxRAViEhXckqK93AeQJ9kYTvlmVlqmcTdhNEtefc+9X3utVmuX+CkK6oyqtu4nwrWP8bF5IZdGYjJ79wDuMCz4D+XmhFWnZbt7ab5ltBB6mbkyAaBPFCJassuwMmNb4L4EZgXwBc4AoGTZrUeA6A9x1yK6tzzvnFDlxBv0D176kCP2TCpbbjBXCRV9DZk0VeAONCE1IQ1zWg3dlF1sFQHWQIXFeBNrLAw5BwHBZWjQl6E3SbbB8X+R4Mg/Ca0wN2WtFeBTut4B84mFI4VpekyAAAAABJRU5ErkJggg=='); + background-size: 100% 100%; + } + } + h6 { + padding: 0 15px 0 28px; + &::before { + content: ''; + position: absolute; + top: 2px; + left: 0; + width: 20px; + height: 20px; + background-image: url('data:image/png;base64,iVBORw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Dp2QNF4/IBrTqdLuLxeIi2tracRSGF/PDgKB55er8muHzATQB2m81m+P1+1NbmPoVyIfsOnUOj+2PNcPmAO1iWbeE4TmexWODz+WQhayrL4No2oCkuJ5Bl2VGO49ZmcisXObdeVSuRaq7ZZ3G10KBTqRQl3pQPGY1GEQgE4HQ6heVDAO5S1cklNmUDXQRB9KZSqXkfESaTCW63G7FYDKFQKDEyMoJoNKqfe/bbAJ7QGpcrxa8xDLOV5/k0kGXZv2ZnZ5FMJtNjmqYvURR1IpFInAcwAeD7ud/pUuDmAY1G41g8Hl9DkmScoqggx3FHAIyJMMlSQfI9V5zKagDC93dsoRFKimQx2dIWOV/U/yn6bx0WyDj8vgLOAAAAAElFTkSuQmCC'); + background-size: 100% 100%; + } + } + hr { + margin: 0; + border: none; + height: 1px; + background-color: #e4e7ed; + margin-bottom: 15px; + } + p { + line-height: 26px; + margin: 0; + margin-bottom: 15px; + } + blockquote { + margin: 0; + line-height: 26px; + margin-bottom: 15px; + background: #ecf8ff; + border-left: 5px solid #50bfff; + color: #50bfff; + padding: 8px 15px; + border-radius: 0 4px 4px 0; + p { + margin: 0; + } + } + pre { + margin: 0; + margin-bottom: 15px; + &::-webkit-scrollbar-track { + background: #fff; + } + &::-webkit-scrollbar { + width: 6px; + height: 6px; + } + &::-webkit-scrollbar-thumb { + border-radius: 3px; + background: #c0c4cc; + } + } + p code { + display: inline-block; + min-height: 26px; + line-height: 26px; + border-radius: 4px; + font-size: 12px; + background: #fdf6ec; + padding: 0 8px; + color: #e6a23c; + vertical-align: top; + } + ol, + ul { + margin: 0; + margin-bottom: 15px; + padding-left: 36px; + li { + line-height: 26px; + } + } + ol li { + list-style: decimal; + } + ul li { + list-style: disc; + } + table { + width: 100%; + max-width: 100%; + table-layout: fixed; + color: #909399; + margin-bottom: 15px; + font-size: 13px; + border-top: 1px solid #ebeef5; + border-left: 1px solid #ebeef5; + border-collapse: collapse; + td, + th { + padding: 8px; + border-bottom: 1px solid #ebeef5; + border-right: 1px solid #ebeef5; + } + thead { + th { + font-weight: 500; + background: #ebeef5; + } + } + } + img { + display: block; + max-width: 100%; + border-radius: 4px; + transition: transform 0.35s, box-shadow 0.35s; + margin: 0 auto; + } + a { + display: inline-block; + line-height: 26px; + color: #409eff; + position: relative; + text-decoration: none; + } + .task { + -webkit-appearance: none; + position: relative; + border-radius: 2px; + width: 15px; + height: 15px; + border: 2px solid #409eff; + vertical-align: -3px; + box-sizing: border-box; margin: 0; - margin-bottom: 15px; - position: relative; - } - h1 { - padding: 0 15px; - &::before { - content: ''; - position: absolute; - top: 8.5px; - left: 0; - height: 7px; - width: 7px; - border-radius: 50%; - background: #409eff; - } - } - h2 { - padding: 0 15px; - &::before { - content: ''; - position: absolute; - top: 10%; - bottom: 10%; - left: 0; - width: 4px; - border-radius: 2px; - background: #409eff; - } - } - h3 { - padding: 0 15px 0 20px; - &::before { - content: '#'; - color: #409eff; - font-weight: 700; - position: absolute; - top: 0; - left: 0; - line-height: 24px; - } - } - h4 { - &::before { - content: '「'; - color: #409eff; - font-weight: 600; - margin-right: 5px; - } - &::after { - content: '」'; - color: #409eff; - font-weight: 600; - margin-left: 5px; - } - } - h5 { - padding: 0 15px 0 28px; - &::before { - content: ''; - position: absolute; - top: 2px; - left: 0; - width: 20px; - height: 20px; - background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAC8klEQVRYR+3WP2gTURwH8O/vKnVRRHKXP52cBO3g4p/BqYNIhy4muajUQRBFKjQV1En6ZxJBcmlRCoJDRe3FDiJVwamLS3FwqbgIgss1l2ZQF5XeT3I1Z3NJ7u5dLlAwN9699/t97vfe7/EIO/yhHe5DD9jpCv3fFVTu856+Xzi62Y/35hj9CFPNrlUwWeRJAJfBGADwBcBNI0/PRZFdAdo4xlQLjCqKjBzogat7hZCRAgPghJGBgbFnxglAOvS7b/fLb+q+qnv5BHBCyEBAWTdnANy2IxOtWSC1qsY+1jOFwAVG+gIVvXyHQbcaKuZCxmf5iMQogXFQtEsBeO5JT6BcMu+Bcb1lUhcyqfExACUAB6JEtgUqi+U5JrrmmcyFHCjwSYtQO+tSUSFbAmXdnAdwJVASdyWLPAS2kbFA8xsHNS13EzCmlx8R6KJQcBcypfFpho3cKxRna3ADsgEo6+ZjAKMhgjZ1d2KWR2gTSyD0h4jnIB2gXDIXwciFCPZvSnMl0wwshYrJGDImaMUGKovlLBPVOrDjh8APzFx8zDkjNa7FzYoGZsKT9XEarQOHmei1aJA246cqOWW6/i2l8VMGzoWIPW/k6eq2Ja6UwCz8pw2JGZ8sS8pUz8fWau/jGp+SgLchcGBgZD1Py41NUuoI+ZloV8ZU93+ogZKzfBiWfXAPCgMJU8Y42avQdMzI4ZBfmSizocqrUeJaAmsvBZGGBCtTziXeRY1rCxRAViEhXckqK93AeQJ9kYTvlmVlqmcTdhNEtefc+9X3utVmuX+CkK6oyqtu4nwrWP8bF5IZdGYjJ79wDuMCz4D+XmhFWnZbt7ab5ltBB6mbkyAaBPFCJassuwMmNb4L4EZgXwBc4AoGTZrUeA6A9x1yK6tzzvnFDlxBv0D176kCP2TCpbbjBXCRV9DZk0VeAONCE1IQ1zWg3dlF1sFQHWQIXFeBNrLAw5BwHBZWjQl6E3SbbB8X+R4Mg/Ca0wN2WtFeBTut4B84mFI4VpekyAAAAABJRU5ErkJggg=='); - background-size: 100% 100%; - } - } - h6 { - padding: 0 15px 0 28px; - &::before { - content: ''; - position: absolute; - top: 2px; - left: 0; - width: 20px; - height: 20px; - background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAEI0lEQVRYR+3Xb2wTZRwH8G/vL22RPy5GW8fK6rJpGeFFY9RO3TRRE1HfmEAammEyjZmOSEg1RrPZaTD6xjhU/Ndlf0CZgwmD+qcgZBRIETeqY0Vcnc7pGonhRY2l3m2t5upqjq693l2vcy+8N81zz/NcPvf75fd7rjos8ku3yH34HyjK0PqlDLPzD56vMNL0VHxmpgXAoUI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LOV5/k0kGXZv2ZnZ5FMJtNjmqYvURR1IpFInAcwAeD7ud/pUuDmAY1G41g8Hl9DkmScoqggx3FHAIyJMMlSQfI9V5zKagDC93dsoRFKimQx2dIWOV/U/yn6bx0WyDj8vgLOAAAAAElFTkSuQmCC'); - background-size: 100% 100%; - } - } - hr { - margin: 0; - border: none; - height: 1px; - background-color: #e4e7ed; - margin-bottom: 15px; - } - p { - line-height: 26px; - margin: 0; - margin-bottom: 15px; - } - blockquote { - margin: 0; - line-height: 26px; - margin-bottom: 15px; - background: #ecf8ff; - border-left: 5px solid #50bfff; - color: #50bfff; - padding: 8px 15px; - border-radius: 0 4px 4px 0; - p { - margin: 0; - } - } - pre { - margin: 0; - margin-bottom: 15px; - &::-webkit-scrollbar-track { - background: #fff; - } - &::-webkit-scrollbar { - width: 6px; - height: 6px; - } - &::-webkit-scrollbar-thumb { - border-radius: 3px; - background: #c0c4cc; - } - } - p code { - display: inline-block; - min-height: 26px; - line-height: 26px; - border-radius: 4px; - font-size: 12px; - background: #fdf6ec; - padding: 0 8px; - color: #e6a23c; - vertical-align: top; - } - ol, - ul { - margin: 0; - margin-bottom: 15px; - padding-left: 36px; - li { - line-height: 26px; - } - } - ol li { - list-style: decimal; - } - ul li { - list-style: disc; - } - table { - width: 100%; - max-width: 100%; - table-layout: fixed; - color: #909399; - margin-bottom: 15px; - font-size: 13px; - border-top: 1px solid #ebeef5; - border-left: 1px solid #ebeef5; - border-collapse: collapse; - td, - th { - padding: 8px; - border-bottom: 1px solid #ebeef5; - border-right: 1px solid #ebeef5; - } - thead { - th { - font-weight: 500; - background: #ebeef5; - } - } - } - img { - display: block; - max-width: 100%; - border-radius: 4px; - transition: transform 0.35s, box-shadow 0.35s; - margin: 0 auto; - } - a { - display: inline-block; - line-height: 26px; - color: #409eff; - position: relative; - text-decoration: none; - } - } - } - } - .cm-progress-left { - position: absolute; - top: 0; - right: 50%; - width: 0; - height: 3px; - background-color: #ff5627; - transition: width 0.5s; - z-index: 1; - } - .cm-progress-right { - position: absolute; - top: 0; - left: 50%; - width: 0; - height: 3px; - background-color: #ff5627; - transition: width 0.5s; - z-index: 1; - } + &:disabled { + cursor: not-allowed; + } + &:checked { + border: none; + background: #409eff; + &::after { + content: ''; + width: 3px; + height: 7px; + position: absolute; + top: 2px; + left: 5px; + border: 2px solid #fff; + border-top: 0; + border-left: 0; + transform: rotate(45deg); + } + } + } + } + } + } + .cm-progress-left { + position: absolute; + top: 0; + right: 50%; + width: 0; + height: 3px; + background-color: #ff5627; + transition: width 0.5s; + z-index: 1; + } + .cm-progress-right { + position: absolute; + top: 0; + left: 50%; + width: 0; + height: 3px; + background-color: #ff5627; + transition: width 0.5s; + z-index: 1; + } } .cm-modal { - display: flex; - align-items: center; - justify-content: center; - position: fixed; - top: 0; - left: 0; - right: 0; - bottom: 0; - z-index: 9999; - background: rgba(0, 0, 0, 0); - visibility: hidden; - transition: background 0.25s, visibility 0.25s; - will-change: background, visibility; - &__wrapper { - width: 380px; - background: #fff; - color: #606266; - border-radius: 4px; - opacity: 0; - transform: translateY(-30%); - transition: opacity 0.25s, transform 0.25s; - &-header { - padding: 10px 20px; - border-bottom: 1px solid #e4e7ed; - display: flex; - align-items: center; - justify-content: space-between; - &--close { - font-size: 20px; - cursor: pointer; - } - } - &-bodyer { - padding: 20px; - .fitem { - display: flex; - align-items: center; - margin-bottom: 15px; - &:last-child { - margin-bottom: 0; - } - label { - margin-right: 10px; - } - input { - width: auto; - flex: 1; - -webkit-appearance: none; - outline: none; - border: 1px solid #dcdfe6; - height: 34px; - box-sizing: border-box; - padding: 0 10px; - border-radius: 3px; - color: #606266; - } - } - .tabbar { - position: relative; - width: 100%; - overflow-x: auto; - display: flex; - margin-bottom: 20px; - &::-webkit-scrollbar { - display: none; - } - &-item { - white-space: nowrap; - margin-right: 15px; - cursor: pointer; - user-select: none; - &:last-child { - margin-right: 0; - } - &.active { - color: #409eff; - } - } - } - .lists { - display: none; - grid-template-columns: repeat(6, 1fr); - font-size: 18px; - border-left: 1px solid #e4e7ed; - border-top: 1px solid #e4e7ed; - font-family: 'Meiryo UI', 'Microsoft YaHei', 'Malgun Gothic', 'Segoe UI', 'Trebuchet MS', Helvetica, 'Monaco', monospace, Tahoma, STXihei, '华文细黑', STHeiti, 'Helvetica Neue', 'Droid Sans', 'wenquanyi micro hei', FreeSans, Arimo, Arial, SimSun, '宋体', Heiti, '黑体', sans-serif; - max-height: 380px; - overflow-y: auto; - overscroll-behavior: none; - &::-webkit-scrollbar-track { - background: #fff; - } - &::-webkit-scrollbar { - width: 6px; - height: 6px; - } - &::-webkit-scrollbar-thumb { - border-radius: 3px; - background: #c0c4cc; - } - &.active { - display: grid; - } - &-item { - display: flex; - align-items: center; - justify-content: center; - border-right: 1px solid #e4e7ed; - border-bottom: 1px solid #e4e7ed; - cursor: pointer; - transition: background 0.25s; - user-select: none; - color: #888; - padding: 5px 0; - &:hover, - .active { - background: #e4e7ed; - } - } - } - } - &-footer { - display: flex; - align-items: center; - justify-content: flex-end; - padding: 0 20px 10px; - &--cancle, - &--confirm { - cursor: pointer; - border: none; - outline: none; - margin-left: 5px; - background: #fff; - color: #606266; - -webkit-appearance: none; - padding: 7px 15px; - border-radius: 3px; - } - &--confirm { - color: #fff; - background: #409eff; - } - } - } - &.active { - visibility: visible; - background: rgba(0, 0, 0, 0.75); - .cm-modal__wrapper { - transform: translateY(0); - opacity: 1; - } - } + display: flex; + align-items: center; + justify-content: center; + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: 9999; + background: rgba(0, 0, 0, 0); + visibility: hidden; + transition: background 0.25s, visibility 0.25s; + will-change: background, visibility; + &__wrapper { + width: 380px; + background: #fff; + color: #606266; + border-radius: 4px; + opacity: 0; + transform: translateY(-30%); + transition: opacity 0.25s, transform 0.25s; + &-header { + padding: 10px 20px; + border-bottom: 1px solid #e4e7ed; + display: flex; + align-items: center; + justify-content: space-between; + &--close { + font-size: 20px; + cursor: pointer; + } + } + &-bodyer { + padding: 20px; + .fitem { + display: flex; + align-items: center; + margin-bottom: 15px; + &:last-child { + margin-bottom: 0; + } + label { + margin-right: 10px; + } + input { + width: auto; + flex: 1; + -webkit-appearance: none; + outline: none; + border: 1px solid #dcdfe6; + height: 34px; + box-sizing: border-box; + padding: 0 10px; + border-radius: 3px; + color: #606266; + } + } + .tabbar { + position: relative; + width: 100%; + overflow-x: auto; + display: flex; + margin-bottom: 20px; + &::-webkit-scrollbar { + display: none; + } + &-item { + white-space: nowrap; + margin-right: 15px; + cursor: pointer; + user-select: none; + &:last-child { + margin-right: 0; + } + &.active { + color: #409eff; + } + } + } + .lists { + display: none; + grid-template-columns: repeat(6, 1fr); + font-size: 18px; + border-left: 1px solid #e4e7ed; + border-top: 1px solid #e4e7ed; + font-family: 'Meiryo UI', 'Microsoft YaHei', 'Malgun Gothic', 'Segoe UI', 'Trebuchet MS', Helvetica, 'Monaco', monospace, Tahoma, STXihei, '华文细黑', STHeiti, 'Helvetica Neue', 'Droid Sans', 'wenquanyi micro hei', FreeSans, Arimo, Arial, SimSun, '宋体', Heiti, '黑体', sans-serif; + max-height: 350px; + overflow-y: auto; + overscroll-behavior: none; + &::-webkit-scrollbar-track { + background: #fff; + } + &::-webkit-scrollbar { + width: 6px; + height: 6px; + } + &::-webkit-scrollbar-thumb { + border-radius: 3px; + background: #c0c4cc; + } + &.active { + display: grid; + } + &-item { + display: flex; + align-items: center; + justify-content: center; + border-right: 1px solid #e4e7ed; + border-bottom: 1px solid #e4e7ed; + cursor: pointer; + transition: background 0.25s; + user-select: none; + color: #888; + padding: 5px 0; + &:hover, + .active { + background: #e4e7ed; + } + } + } + } + &-footer { + display: flex; + align-items: center; + justify-content: flex-end; + padding: 0 20px 10px; + &--cancle, + &--confirm { + cursor: pointer; + border: none; + outline: none; + margin-left: 5px; + background: #fff; + color: #606266; + -webkit-appearance: none; + padding: 7px 15px; + border-radius: 3px; + } + &--confirm { + color: #fff; + background: #409eff; + } + } + } + &.active { + visibility: visible; + background: rgba(0, 0, 0, 0.75); + .cm-modal__wrapper { + transform: translateY(0); + opacity: 1; + } + } } @media (max-width: 768px) { - .cm-modal__wrapper { - width: 90%; - } + .cm-modal__wrapper { + width: 90%; + } } diff --git a/typecho/write/js/_actions.js b/typecho/write/js/_actions.js index 8402a33..0bb64eb 100644 --- a/typecho/write/js/_actions.js +++ b/typecho/write/js/_actions.js @@ -1,7 +1,7 @@ import { undo, redo } from '@codemirror/history'; export default class JoeAction { - constructor() { - $('body').append(` + constructor() { + $('body').append(`
' + htmlspecialchars(matches[3]) + '
');
- };
- })(this)
- );
- text = text.replace(
- /(^|[^\\])(\$+)(.+?)\2/gm,
- (function (_this) {
- return function () {
- var matches;
- matches = 1 <= arguments.length ? slice.call(arguments, 0) : [];
- return matches[1] + _this.makeHolder(matches[2] + htmlspecialchars(matches[3]) + matches[2]);
- };
- })(this)
- );
- text = text.replace(
- /\\(.)/g,
- (function (_this) {
- return function () {
- var escaped, matches, prefix;
- matches = 1 <= arguments.length ? slice.call(arguments, 0) : [];
- prefix = matches[1].match(/^[-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]$/) ? '' : '\\';
- escaped = htmlspecialchars(matches[1]);
- escaped = escaped.replace(/\$/g, '$');
- return _this.makeHolder(prefix + escaped);
- };
- })(this)
- );
- text = text.replace(
- /<(https?:\/\/.+)>/gi,
- (function (_this) {
- return function () {
- var link, matches, url;
- matches = 1 <= arguments.length ? slice.call(arguments, 0) : [];
- url = _this.cleanUrl(matches[1]);
- link = _this.call('parseLink', matches[1]);
- return _this.makeHolder('' + link + '');
- };
- })(this)
- );
- text = text.replace(
- /<(\/?)([a-z0-9-]+)(\s+[^>]*)?>/gi,
- (function (_this) {
- return function () {
- var matches;
- matches = 1 <= arguments.length ? slice.call(arguments, 0) : [];
- if (_this.html || ('|' + _this.commonWhiteList + '|' + whiteList + '|').indexOf('|' + matches[2].toLowerCase() + '|') >= 0) {
- return _this.makeHolder(matches[0]);
- } else {
- return _this.makeHolder(htmlspecialchars(matches[0]));
- }
- };
- })(this)
- );
- if (this.html) {
- text = text.replace(
- //g,
- (function (_this) {
- return function () {
- var matches;
- matches = 1 <= arguments.length ? slice.call(arguments, 0) : [];
- return _this.makeHolder(matches[0]);
- };
- })(this)
- );
- }
- text = str_replace(['<', '>'], ['<', '>'], text);
- text = text.replace(
- /\[\^((?:[^\]]|\\\]|\\\[)+?)\]/g,
- (function (_this) {
- return function () {
- var id, matches;
- matches = 1 <= arguments.length ? slice.call(arguments, 0) : [];
- id = _this.footnotes.indexOf(matches[1]);
- if (id < 0) {
- id = _this.footnotes.length + 1;
- _this.footnotes.push(_this.parseInline(matches[1], '', false));
- }
- return _this.makeHolder('' + id + '');
- };
- })(this)
- );
- text = text.replace(
- /!\[((?:[^\]]|\\\]|\\\[)*?)\]\(((?:[^\)]|\\\)|\\\()+?)\)/g,
- (function (_this) {
- return function () {
- var escaped, matches, url;
- matches = 1 <= arguments.length ? slice.call(arguments, 0) : [];
- escaped = htmlspecialchars(_this.escapeBracket(matches[1]));
- url = _this.escapeBracket(matches[2]);
- url = _this.cleanUrl(url);
- return _this.makeHolder('');
- };
- })(this)
- );
- text = text.replace(
- /!\[((?:[^\]]|\\\]|\\\[)*?)\]\[((?:[^\]]|\\\]|\\\[)+?)\]/g,
- (function (_this) {
- return function () {
- var escaped, matches, result;
- matches = 1 <= arguments.length ? slice.call(arguments, 0) : [];
- escaped = htmlspecialchars(_this.escapeBracket(matches[1]));
- result = _this.definitions[matches[2]] != null ? '' : escaped;
- return _this.makeHolder(result);
- };
- })(this)
- );
- text = text.replace(
- /\[((?:[^\]]|\\\]|\\\[)+?)\]\(((?:[^\)]|\\\)|\\\()+?)\)/g,
- (function (_this) {
- return function () {
- var escaped, matches, url;
- matches = 1 <= arguments.length ? slice.call(arguments, 0) : [];
- escaped = _this.parseInline(_this.escapeBracket(matches[1]), '', false, false);
- url = _this.escapeBracket(matches[2]);
- url = _this.cleanUrl(url);
- return _this.makeHolder('' + escaped + '');
- };
- })(this)
- );
- text = text.replace(
- /\[((?:[^\]]|\\\]|\\\[)+?)\]\[((?:[^\]]|\\\]|\\\[)+?)\]/g,
- (function (_this) {
- return function () {
- var escaped, matches, result;
- matches = 1 <= arguments.length ? slice.call(arguments, 0) : [];
- escaped = _this.parseInline(_this.escapeBracket(matches[1]), '', false, false);
- result = _this.definitions[matches[2]] != null ? '' + escaped + '' : escaped;
- return _this.makeHolder(result);
- };
- })(this)
- );
- text = this.parseInlineCallback(text);
- text = text.replace(/<([_a-z0-9-\.\+]+@[^@]+\.[a-z]{2,})>/gi, '$1');
- if (enableAutoLink) {
- regex = new RegExp('(^|[^"])((https?):[' + pL + '_0-9-\\./%#!@\\?\\[\\]\\+=~\\|\\,&\\(\\)]+)($|[^"])', 'ig');
- text = text.replace(
- regex,
- (function (_this) {
- return function () {
- var link, matches;
- matches = 1 <= arguments.length ? slice.call(arguments, 0) : [];
- link = _this.call('parseLink', matches[2]);
- return matches[1] + '' + link + '' + matches[4];
- };
- })(this)
- );
- }
- text = this.call('afterParseInlineBeforeRelease', text);
- text = this.releaseHolder(text, clearHolders);
- text = this.call('afterParseInline', text);
- return text;
- };
-
- Parser.prototype.parseInlineCallback = function (text) {
- text = text.replace(
- /(\*{3})((?:.|\r)+?)\1/gm,
- (function (_this) {
- return function () {
- var matches;
- matches = 1 <= arguments.length ? slice.call(arguments, 0) : [];
- return '' + _this.parseInlineCallback(matches[2]) + '';
- };
- })(this)
- );
- text = text.replace(
- /(\*{2})((?:.|\r)+?)\1/gm,
- (function (_this) {
- return function () {
- var matches;
- matches = 1 <= arguments.length ? slice.call(arguments, 0) : [];
- return '' + _this.parseInlineCallback(matches[2]) + '';
- };
- })(this)
- );
- text = text.replace(
- /(\*)((?:.|\r)+?)\1/gm,
- (function (_this) {
- return function () {
- var matches;
- matches = 1 <= arguments.length ? slice.call(arguments, 0) : [];
- return '' + _this.parseInlineCallback(matches[2]) + '';
- };
- })(this)
- );
- text = text.replace(
- /(\s+|^)(_{3})((?:.|\r)+?)\2(\s+|$)/gm,
- (function (_this) {
- return function () {
- var matches;
- matches = 1 <= arguments.length ? slice.call(arguments, 0) : [];
- return matches[1] + '' + _this.parseInlineCallback(matches[3]) + '' + matches[4];
- };
- })(this)
- );
- text = text.replace(
- /(\s+|^)(_{2})((?:.|\r)+?)\2(\s+|$)/gm,
- (function (_this) {
- return function () {
- var matches;
- matches = 1 <= arguments.length ? slice.call(arguments, 0) : [];
- return matches[1] + '' + _this.parseInlineCallback(matches[3]) + '' + matches[4];
- };
- })(this)
- );
- text = text.replace(
- /(\s+|^)(_)((?:.|\r)+?)\2(\s+|$)/gm,
- (function (_this) {
- return function () {
- var matches;
- matches = 1 <= arguments.length ? slice.call(arguments, 0) : [];
- return matches[1] + '' + _this.parseInlineCallback(matches[3]) + '' + matches[4];
- };
- })(this)
- );
- text = text.replace(
- /(~{2})((?:.|\r)+?)\1/gm,
- (function (_this) {
- return function () {
- var matches;
- matches = 1 <= arguments.length ? slice.call(arguments, 0) : [];
- return '' + str + '
';
- }
- };
-
- Parser.prototype.parsePre = function (lines, value, start) {
- var str;
- lines = lines.map(function (line) {
- return htmlspecialchars(line.substring(4));
- });
- str = this.markLines(lines, start).join('\n');
- if (str.match(/^\s*$/)) {
- return '';
- } else {
- return '' + str + '
';
- }
- };
-
- Parser.prototype.parseAhtml = function (lines, value, start) {
- return trim(this.markLines(lines, start).join('\n'));
- };
-
- Parser.prototype.parseShtml = function (lines, value, start) {
- return trim(this.markLines(lines.slice(1, -1), start + 1).join('\n'));
- };
-
- Parser.prototype.parseMath = function (lines, value, start, end) {
- return '' + this.markLine(start, end) + htmlspecialchars(lines.join('\n')) + '
'; - }; - - Parser.prototype.parseSh = function (lines, num, start, end) { - var line; - line = this.markLine(start, end) + this.parseInline(trim(lines[0], '# ')); - if (line.match(/^\s*$/)) { - return ''; - } else { - return '' + this.parse(str, true, start) + ''; - } - }; - - Parser.prototype.parseList = function (lines, value, start) { - var found, html, j, key, l, lastType, leftLines, leftStart, len, len1, line, matches, minSpace, row, rows, secondFound, secondMinSpace, space, text, type; - html = ''; - minSpace = 99999; - secondMinSpace = 99999; - found = false; - secondFound = false; - rows = []; - for (key = j = 0, len = lines.length; j < len; key = ++j) { - line = lines[key]; - if ((matches = line.match(/^(\s*)((?:[0-9]+\.?)|\-|\+|\*)(\s+)(.*)$/i))) { - space = matches[1].length; - type = 0 <= '+-*'.indexOf(matches[2]) ? 'ul' : 'ol'; - minSpace = Math.min(space, minSpace); - found = true; - if (space > 0) { - secondMinSpace = Math.min(space, secondMinSpace); - secondFound = true; - } - rows.push([space, type, line, matches[4]]); - } else { - rows.push(line); - if (!!(matches = line.match(/^(\s*)/))) { - space = matches[1].length; - if (space > 0) { - secondMinSpace = Math.min(space, secondMinSpace); - secondFound = true; - } - } - } - } - minSpace = found ? minSpace : 0; - secondMinSpace = secondFound ? secondMinSpace : minSpace; - lastType = ''; - leftLines = []; - leftStart = 0; - for (key = l = 0, len1 = rows.length; l < len1; key = ++l) { - row = rows[key]; - if (row instanceof Array) { - (space = row[0]), (type = row[1]), (line = row[2]), (text = row[3]); - if (space !== minSpace) { - leftLines.push(line.replace(new RegExp('^\\s{' + secondMinSpace + '}'), '')); - } else { - if (leftLines.length > 0) { - html += '
');
- str = str.replace(/\n/g, '
');
- if (str.match(/^\s*$/)) {
- return '';
- } else {
- if (inline) {
- return str;
- } else {
- return '
' + str + '
'; - } - } - }; - - Parser.prototype.parseFootnote = function (lines, value) { - var index, note, space; - (space = value[0]), (note = value[1]); - index = this.footnotes.indexOf(note); - if (index >= 0) { - lines = lines.slice(0); - lines[0] = lines[0].replace(/^\[\^((?:[^\]]|\]|\[)+?)\]:/, ''); - this.footnotes[index] = lines; - } - return ''; - }; - - Parser.prototype.parseDefinition = function () { - return ''; - }; - - Parser.prototype.parseHtml = function (lines, type, start) { - lines = lines.map( - (function (_this) { - return function (line) { - return _this.parseInline(line, _this.specialWhiteList[type] != null ? _this.specialWhiteList[type] : ''); - }; - })(this) - ); - return this.markLines(lines, start).join('\n'); - }; - - Parser.prototype.cleanUrl = function (url) { - var matches, regexUrl, regexWord; - regexUrl = new RegExp('^\\s*((http|https|ftp|mailto):[' + pL + '_a-z0-9-:\\.\\*/%#;!@\\?\\[\\]\\+=~\\|\\,&\\(\\)]+)', 'i'); - regexWord = new RegExp('^\\s*([' + pL + '_a-z0-9-:\\.\\*/%#!@\\?\\+=~\\|\\,&]+)', 'i'); - if (!!(matches = url.match(regexUrl))) { - return matches[1]; - } else if (!!(matches = url.match(regexWord))) { - return matches[1]; - } else { - return '#'; - } - }; - - Parser.prototype.escapeBracket = function (str) { - return str_replace(['\\[', '\\]', '\\(', '\\)'], ['[', ']', '(', ')'], str); - }; - - Parser.prototype.startBlock = function (type, start, value) { - if (value == null) { - value = null; - } - this.pos += 1; - this.current = type; - this.blocks.push([type, start, start, value]); - return this; - }; - - Parser.prototype.endBlock = function () { - this.current = 'normal'; - return this; - }; - - Parser.prototype.isBlock = function (type, value) { - if (value == null) { - value = null; - } - return this.current === type && (null === value ? true : this.blocks[this.pos][3] === value); - }; - - Parser.prototype.getBlock = function () { - if (this.blocks[this.pos] != null) { - return this.blocks[this.pos]; - } else { - return null; - } - }; - - Parser.prototype.setBlock = function (to, value) { - if (to == null) { - to = null; - } - if (value == null) { - value = null; - } - if (to !== null) { - this.blocks[this.pos][2] = to; - } - if (value !== null) { - this.blocks[this.pos][3] = value; - } - return this; - }; - - Parser.prototype.backBlock = function (step, type, value) { - var item, last; - if (value == null) { - value = null; - } - if (this.pos < 0) { - return this.startBlock(type, 0, value); - } - last = this.blocks[this.pos][2]; - this.blocks[this.pos][2] = last - step; - item = [type, last - step + 1, last, value]; - if (this.blocks[this.pos][1] <= this.blocks[this.pos][2]) { - this.pos += 1; - this.blocks.push(item); - } else { - this.blocks[this.pos] = item; - } - this.current = type; - return this; - }; - - Parser.prototype.combineBlock = function () { - var current, prev; - if (this.pos < 1) { - return this; - } - prev = this.blocks[this.pos - 1].slice(0); - current = this.blocks[this.pos].slice(0); - prev[2] = current[2]; - this.blocks[this.pos - 1] = prev; - this.current = prev[0]; - this.blocks = this.blocks.slice(0, -1); - this.pos -= 1; - return this; - }; - - return Parser; - })(); - - if (typeof module !== 'undefined' && module !== null) { - module.exports = Parser; - } else if (typeof window !== 'undefined' && window !== null) { - window.HyperDown = Parser; - } + var Parser, + slice = [].slice; + + Parser = (function () { + var array_keys, array_values, htmlspecialchars, pL, preg_quote, str_replace, trim, ucfirst; + + ucfirst = function (str) { + return str.charAt(0).toUpperCase() + str.substring(1); + }; + + preg_quote = function (str) { + return str.replace(/[-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&'); + }; + + pL = 'A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC'; + + str_replace = function (search, replace, str) { + var i, j, l, len, len1, val; + if (search instanceof Array) { + if (replace instanceof Array) { + for (i = j = 0, len = search.length; j < len; i = ++j) { + val = search[i]; + str = str_replace(val, replace[i], str); + } + } else { + for (l = 0, len1 = search.length; l < len1; l++) { + val = search[l]; + str = str_replace(val, replace, str); + } + } + } else { + search = preg_quote(search); + str = str.replace(new RegExp(search, 'g'), replace.replace(/\$/g, '$$$$')); + } + return str; + }; + + htmlspecialchars = function (str) { + return str.replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"'); + }; + + trim = function (str, ch) { + var c, i, j, ref, search; + if (ch == null) { + ch = null; + } + if (ch != null) { + search = ''; + for (i = j = 0, ref = ch.length - 1; 0 <= ref ? j <= ref : j >= ref; i = 0 <= ref ? ++j : --j) { + c = ch[i]; + c = preg_quote(c); + search += c; + } + search = '[' + search + ']*'; + return str.replace(new RegExp('^' + search), '').replace(new RegExp(search + '$'), ''); + } else { + return str.replace(/^\s*/, '').replace(/\s*$/, ''); + } + }; + + array_keys = function (arr) { + var _, j, k, len, result; + result = []; + if (arr instanceof Array) { + for (k = j = 0, len = arr.length; j < len; k = ++j) { + _ = arr[k]; + result.push(k); + } + } else { + for (k in arr) { + result.push(k); + } + } + return result; + }; + + array_values = function (arr) { + var _, j, len, result, v; + result = []; + if (arr instanceof Array) { + for (j = 0, len = arr.length; j < len; j++) { + v = arr[j]; + result.push(v); + } + } else { + for (_ in arr) { + v = arr[_]; + result.push(v); + } + } + return result; + }; + + function Parser() { + this.commonWhiteList = 'kbd|b|i|strong|em|sup|sub|br|code|del|a|hr|small'; + this.blockHtmlTags = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|form|fieldset|iframe|hr|legend|article|section|nav|aside|hgroup|header|footer|figcaption|svg|script|noscript'; + this.specialWhiteList = { + table: 'table|tbody|thead|tfoot|tr|td|th' + }; + this.hooks = {}; + this.html = false; + this.line = false; + this.blockParsers = [ + ['code', 10], + ['shtml', 20], + ['pre', 30], + ['ahtml', 40], + ['shr', 50], + ['list', 60], + ['math', 70], + ['html', 80], + ['footnote', 90], + ['definition', 100], + ['quote', 110], + ['table', 120], + ['sh', 130], + ['mh', 140], + ['dhr', 150], + ['default', 9999] + ]; + this.parsers = {}; + } + + Parser.prototype.makeHtml = function (text) { + var html, j, len, name, parser, ref; + this.footnotes = []; + this.definitions = {}; + this.holders = {}; + this.uniqid = Math.ceil(Math.random() * 10000000) + Math.ceil(Math.random() * 10000000); + this.id = 0; + this.blockParsers.sort(function (a, b) { + if (a[1] < b[1]) { + return -1; + } else { + return 1; + } + }); + ref = this.blockParsers; + for (j = 0, len = ref.length; j < len; j++) { + parser = ref[j]; + name = parser[0]; + if (parser[2] !== void 0) { + this.parsers[name] = parser[2]; + } else { + this.parsers[name] = this['parseBlock' + ucfirst(name)].bind(this); + } + } + text = this.initText(text); + html = this.parse(text); + html = this.makeFootnotes(html); + html = this.optimizeLines(html); + return this.call('makeHtml', html); + }; + + Parser.prototype.enableHtml = function (html1) { + this.html = html1 != null ? html1 : true; + }; + + Parser.prototype.enableLine = function (line1) { + this.line = line1 != null ? line1 : true; + }; + + Parser.prototype.hook = function (type, cb) { + if (this.hooks[type] == null) { + this.hooks[type] = []; + } + return this.hooks[type].push(cb); + }; + + Parser.prototype.makeHolder = function (str) { + var key; + key = '|\r' + this.uniqid + this.id + '\r|'; + this.id += 1; + this.holders[key] = str; + return key; + }; + + Parser.prototype.initText = function (text) { + return text + .replace(/\t/g, ' ') + .replace(/\r/g, '') + .replace(/(\u000A|\u000D|\u2028|\u2029)/g, '\n'); + }; + + Parser.prototype.makeFootnotes = function (html) { + var index, val; + if (this.footnotes.length > 0) { + html += '' + htmlspecialchars(matches[3]) + '
');
+ };
+ })(this)
+ );
+ text = text.replace(
+ /(^|[^\\])(\$+)(.+?)\2/gm,
+ (function (_this) {
+ return function () {
+ var matches;
+ matches = 1 <= arguments.length ? slice.call(arguments, 0) : [];
+ return matches[1] + _this.makeHolder(matches[2] + htmlspecialchars(matches[3]) + matches[2]);
+ };
+ })(this)
+ );
+ text = text.replace(
+ /\\(.)/g,
+ (function (_this) {
+ return function () {
+ var escaped, matches, prefix;
+ matches = 1 <= arguments.length ? slice.call(arguments, 0) : [];
+ prefix = matches[1].match(/^[-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]$/) ? '' : '\\';
+ escaped = htmlspecialchars(matches[1]);
+ escaped = escaped.replace(/\$/g, '$');
+ return _this.makeHolder(prefix + escaped);
+ };
+ })(this)
+ );
+ text = text.replace(
+ /<(https?:\/\/.+)>/gi,
+ (function (_this) {
+ return function () {
+ var link, matches, url;
+ matches = 1 <= arguments.length ? slice.call(arguments, 0) : [];
+ url = _this.cleanUrl(matches[1]);
+ link = _this.call('parseLink', matches[1]);
+ return _this.makeHolder('' + link + '');
+ };
+ })(this)
+ );
+ text = text.replace(
+ /<(\/?)([a-z0-9-]+)(\s+[^>]*)?>/gi,
+ (function (_this) {
+ return function () {
+ var matches;
+ matches = 1 <= arguments.length ? slice.call(arguments, 0) : [];
+ if (_this.html || ('|' + _this.commonWhiteList + '|' + whiteList + '|').indexOf('|' + matches[2].toLowerCase() + '|') >= 0) {
+ return _this.makeHolder(matches[0]);
+ } else {
+ return _this.makeHolder(htmlspecialchars(matches[0]));
+ }
+ };
+ })(this)
+ );
+ if (this.html) {
+ text = text.replace(
+ //g,
+ (function (_this) {
+ return function () {
+ var matches;
+ matches = 1 <= arguments.length ? slice.call(arguments, 0) : [];
+ return _this.makeHolder(matches[0]);
+ };
+ })(this)
+ );
+ }
+ text = str_replace(['<', '>'], ['<', '>'], text);
+ text = text.replace(
+ /\[\^((?:[^\]]|\\\]|\\\[)+?)\]/g,
+ (function (_this) {
+ return function () {
+ var id, matches;
+ matches = 1 <= arguments.length ? slice.call(arguments, 0) : [];
+ id = _this.footnotes.indexOf(matches[1]);
+ if (id < 0) {
+ id = _this.footnotes.length + 1;
+ _this.footnotes.push(_this.parseInline(matches[1], '', false));
+ }
+ return _this.makeHolder('' + id + '');
+ };
+ })(this)
+ );
+ text = text.replace(
+ /!\[((?:[^\]]|\\\]|\\\[)*?)\]\(((?:[^\)]|\\\)|\\\()+?)\)/g,
+ (function (_this) {
+ return function () {
+ var escaped, matches, url;
+ matches = 1 <= arguments.length ? slice.call(arguments, 0) : [];
+ escaped = htmlspecialchars(_this.escapeBracket(matches[1]));
+ url = _this.escapeBracket(matches[2]);
+ url = _this.cleanUrl(url);
+ return _this.makeHolder('');
+ };
+ })(this)
+ );
+ text = text.replace(
+ /!\[((?:[^\]]|\\\]|\\\[)*?)\]\[((?:[^\]]|\\\]|\\\[)+?)\]/g,
+ (function (_this) {
+ return function () {
+ var escaped, matches, result;
+ matches = 1 <= arguments.length ? slice.call(arguments, 0) : [];
+ escaped = htmlspecialchars(_this.escapeBracket(matches[1]));
+ result = _this.definitions[matches[2]] != null ? '' : escaped;
+ return _this.makeHolder(result);
+ };
+ })(this)
+ );
+ text = text.replace(
+ /\[((?:[^\]]|\\\]|\\\[)+?)\]\(((?:[^\)]|\\\)|\\\()+?)\)/g,
+ (function (_this) {
+ return function () {
+ var escaped, matches, url;
+ matches = 1 <= arguments.length ? slice.call(arguments, 0) : [];
+ escaped = _this.parseInline(_this.escapeBracket(matches[1]), '', false, false);
+ url = _this.escapeBracket(matches[2]);
+ url = _this.cleanUrl(url);
+ return _this.makeHolder('' + escaped + '');
+ };
+ })(this)
+ );
+ text = text.replace(
+ /\[((?:[^\]]|\\\]|\\\[)+?)\]\[((?:[^\]]|\\\]|\\\[)+?)\]/g,
+ (function (_this) {
+ return function () {
+ var escaped, matches, result;
+ matches = 1 <= arguments.length ? slice.call(arguments, 0) : [];
+ escaped = _this.parseInline(_this.escapeBracket(matches[1]), '', false, false);
+ result = _this.definitions[matches[2]] != null ? '' + escaped + '' : escaped;
+ return _this.makeHolder(result);
+ };
+ })(this)
+ );
+ text = this.parseInlineCallback(text);
+ text = text.replace(/<([_a-z0-9-\.\+]+@[^@]+\.[a-z]{2,})>/gi, '$1');
+ if (enableAutoLink) {
+ regex = new RegExp('(^|[^"])((https?):[' + pL + '_0-9-\\./%#!@\\?\\[\\]\\+=~\\|\\,&\\(\\)]+)($|[^"])', 'ig');
+ text = text.replace(
+ regex,
+ (function (_this) {
+ return function () {
+ var link, matches;
+ matches = 1 <= arguments.length ? slice.call(arguments, 0) : [];
+ link = _this.call('parseLink', matches[2]);
+ return matches[1] + '' + link + '' + matches[4];
+ };
+ })(this)
+ );
+ }
+ text = this.call('afterParseInlineBeforeRelease', text);
+ text = this.releaseHolder(text, clearHolders);
+ text = this.call('afterParseInline', text);
+ return text;
+ };
+
+ Parser.prototype.parseInlineCallback = function (text) {
+ text = text.replace(
+ /(\*{3})((?:.|\r)+?)\1/gm,
+ (function (_this) {
+ return function () {
+ var matches;
+ matches = 1 <= arguments.length ? slice.call(arguments, 0) : [];
+ return '' + _this.parseInlineCallback(matches[2]) + '';
+ };
+ })(this)
+ );
+ text = text.replace(
+ /(\*{2})((?:.|\r)+?)\1/gm,
+ (function (_this) {
+ return function () {
+ var matches;
+ matches = 1 <= arguments.length ? slice.call(arguments, 0) : [];
+ return '' + _this.parseInlineCallback(matches[2]) + '';
+ };
+ })(this)
+ );
+ text = text.replace(
+ /(\*)((?:.|\r)+?)\1/gm,
+ (function (_this) {
+ return function () {
+ var matches;
+ matches = 1 <= arguments.length ? slice.call(arguments, 0) : [];
+ return '' + _this.parseInlineCallback(matches[2]) + '';
+ };
+ })(this)
+ );
+ text = text.replace(
+ /(\s+|^)(_{3})((?:.|\r)+?)\2(\s+|$)/gm,
+ (function (_this) {
+ return function () {
+ var matches;
+ matches = 1 <= arguments.length ? slice.call(arguments, 0) : [];
+ return matches[1] + '' + _this.parseInlineCallback(matches[3]) + '' + matches[4];
+ };
+ })(this)
+ );
+ text = text.replace(
+ /(\s+|^)(_{2})((?:.|\r)+?)\2(\s+|$)/gm,
+ (function (_this) {
+ return function () {
+ var matches;
+ matches = 1 <= arguments.length ? slice.call(arguments, 0) : [];
+ return matches[1] + '' + _this.parseInlineCallback(matches[3]) + '' + matches[4];
+ };
+ })(this)
+ );
+ text = text.replace(
+ /(\s+|^)(_)((?:.|\r)+?)\2(\s+|$)/gm,
+ (function (_this) {
+ return function () {
+ var matches;
+ matches = 1 <= arguments.length ? slice.call(arguments, 0) : [];
+ return matches[1] + '' + _this.parseInlineCallback(matches[3]) + '' + matches[4];
+ };
+ })(this)
+ );
+ text = text.replace(
+ /(~{2})((?:.|\r)+?)\1/gm,
+ (function (_this) {
+ return function () {
+ var matches;
+ matches = 1 <= arguments.length ? slice.call(arguments, 0) : [];
+ return '' + str + '
';
+ }
+ };
+
+ Parser.prototype.parsePre = function (lines, value, start) {
+ var str;
+ lines = lines.map(function (line) {
+ return htmlspecialchars(line.substring(4));
+ });
+ str = this.markLines(lines, start).join('\n');
+ if (str.match(/^\s*$/)) {
+ return '';
+ } else {
+ return '' + str + '
';
+ }
+ };
+
+ Parser.prototype.parseAhtml = function (lines, value, start) {
+ return trim(this.markLines(lines, start).join('\n'));
+ };
+
+ Parser.prototype.parseShtml = function (lines, value, start) {
+ return trim(this.markLines(lines.slice(1, -1), start + 1).join('\n'));
+ };
+
+ Parser.prototype.parseMath = function (lines, value, start, end) {
+ return '' + this.markLine(start, end) + htmlspecialchars(lines.join('\n')) + '
'; + }; + + Parser.prototype.parseSh = function (lines, num, start, end) { + var line; + line = this.markLine(start, end) + this.parseInline(trim(lines[0], '# ')); + if (line.match(/^\s*$/)) { + return ''; + } else { + return '' + this.parse(str, true, start) + ''; + } + }; + + Parser.prototype.parseList = function (lines, value, start) { + var found, html, j, key, l, lastType, leftLines, leftStart, len, len1, line, matches, minSpace, row, rows, secondFound, secondMinSpace, space, text, type; + html = ''; + minSpace = 99999; + secondMinSpace = 99999; + found = false; + secondFound = false; + rows = []; + for (key = j = 0, len = lines.length; j < len; key = ++j) { + line = lines[key]; + if ((matches = line.match(/^(\s*)((?:[0-9]+\.?)|\-|\+|\*)(\s+)(.*)$/i))) { + space = matches[1].length; + type = 0 <= '+-*'.indexOf(matches[2]) ? 'ul' : 'ol'; + minSpace = Math.min(space, minSpace); + found = true; + if (space > 0) { + secondMinSpace = Math.min(space, secondMinSpace); + secondFound = true; + } + rows.push([space, type, line, matches[4]]); + } else { + rows.push(line); + if (!!(matches = line.match(/^(\s*)/))) { + space = matches[1].length; + if (space > 0) { + secondMinSpace = Math.min(space, secondMinSpace); + secondFound = true; + } + } + } + } + minSpace = found ? minSpace : 0; + secondMinSpace = secondFound ? secondMinSpace : minSpace; + lastType = ''; + leftLines = []; + leftStart = 0; + for (key = l = 0, len1 = rows.length; l < len1; key = ++l) { + row = rows[key]; + if (row instanceof Array) { + (space = row[0]), (type = row[1]), (line = row[2]), (text = row[3]); + if (space !== minSpace) { + leftLines.push(line.replace(new RegExp('^\\s{' + secondMinSpace + '}'), '')); + } else { + if (leftLines.length > 0) { + html += '
');
+ str = str.replace(/\n/g, '
');
+ if (str.match(/^\s*$/)) {
+ return '';
+ } else {
+ if (inline) {
+ return str;
+ } else {
+ return '
' + str + '
'; + } + } + }; + + Parser.prototype.parseFootnote = function (lines, value) { + var index, note, space; + (space = value[0]), (note = value[1]); + index = this.footnotes.indexOf(note); + if (index >= 0) { + lines = lines.slice(0); + lines[0] = lines[0].replace(/^\[\^((?:[^\]]|\]|\[)+?)\]:/, ''); + this.footnotes[index] = lines; + } + return ''; + }; + + Parser.prototype.parseDefinition = function () { + return ''; + }; + + Parser.prototype.parseHtml = function (lines, type, start) { + lines = lines.map( + (function (_this) { + return function (line) { + return _this.parseInline(line, _this.specialWhiteList[type] != null ? _this.specialWhiteList[type] : ''); + }; + })(this) + ); + return this.markLines(lines, start).join('\n'); + }; + + Parser.prototype.cleanUrl = function (url) { + var matches, regexUrl, regexWord; + regexUrl = new RegExp('^\\s*((http|https|ftp|mailto):[' + pL + '_a-z0-9-:\\.\\*/%#;!@\\?\\[\\]\\+=~\\|\\,&\\(\\)]+)', 'i'); + regexWord = new RegExp('^\\s*([' + pL + '_a-z0-9-:\\.\\*/%#!@\\?\\+=~\\|\\,&]+)', 'i'); + if (!!(matches = url.match(regexUrl))) { + return matches[1]; + } else if (!!(matches = url.match(regexWord))) { + return matches[1]; + } else { + return '#'; + } + }; + + Parser.prototype.escapeBracket = function (str) { + return str_replace(['\\[', '\\]', '\\(', '\\)'], ['[', ']', '(', ')'], str); + }; + + Parser.prototype.startBlock = function (type, start, value) { + if (value == null) { + value = null; + } + this.pos += 1; + this.current = type; + this.blocks.push([type, start, start, value]); + return this; + }; + + Parser.prototype.endBlock = function () { + this.current = 'normal'; + return this; + }; + + Parser.prototype.isBlock = function (type, value) { + if (value == null) { + value = null; + } + return this.current === type && (null === value ? true : this.blocks[this.pos][3] === value); + }; + + Parser.prototype.getBlock = function () { + if (this.blocks[this.pos] != null) { + return this.blocks[this.pos]; + } else { + return null; + } + }; + + Parser.prototype.setBlock = function (to, value) { + if (to == null) { + to = null; + } + if (value == null) { + value = null; + } + if (to !== null) { + this.blocks[this.pos][2] = to; + } + if (value !== null) { + this.blocks[this.pos][3] = value; + } + return this; + }; + + Parser.prototype.backBlock = function (step, type, value) { + var item, last; + if (value == null) { + value = null; + } + if (this.pos < 0) { + return this.startBlock(type, 0, value); + } + last = this.blocks[this.pos][2]; + this.blocks[this.pos][2] = last - step; + item = [type, last - step + 1, last, value]; + if (this.blocks[this.pos][1] <= this.blocks[this.pos][2]) { + this.pos += 1; + this.blocks.push(item); + } else { + this.blocks[this.pos] = item; + } + this.current = type; + return this; + }; + + Parser.prototype.combineBlock = function () { + var current, prev; + if (this.pos < 1) { + return this; + } + prev = this.blocks[this.pos - 1].slice(0); + current = this.blocks[this.pos].slice(0); + prev[2] = current[2]; + this.blocks[this.pos - 1] = prev; + this.current = prev[0]; + this.blocks = this.blocks.slice(0, -1); + this.pos -= 1; + return this; + }; + + return Parser; + })(); + + if (typeof module !== 'undefined' && module !== null) { + module.exports = Parser; + } else if (typeof window !== 'undefined' && window !== null) { + window.HyperDown = Parser; + } }.call(this)); diff --git a/typecho/write/js/joe.write.chunk.js b/typecho/write/js/joe.write.chunk.js index 95aec92..f6bdcef 100644 --- a/typecho/write/js/joe.write.chunk.js +++ b/typecho/write/js/joe.write.chunk.js @@ -1,4 +1,4 @@ -!function(){"use strict";let r="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2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