Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: tinymce/tinymce
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: release/5.10
Choose a base ref
...
head repository: cnblogs/tinymce
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: release/5.10
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 8 commits
  • 7 files changed
  • 1 contributor

Commits on Jan 19, 2023

  1. Copy the full SHA
    df73952 View commit details
  2. Copy the full SHA
    bb06a82 View commit details
  3. Copy the full SHA
    7ed3f91 View commit details
  4. Copy the full SHA
    8fd1235 View commit details
  5. Copy the full SHA
    f1566d4 View commit details
  6. Copy the full SHA
    b09668e View commit details
  7. Copy the full SHA
    6bcb109 View commit details
  8. Copy the full SHA
    192b143 View commit details
Showing with 83 additions and 7 deletions.
  1. +32 −0 .github/workflows/build-lint-test.yaml
  2. +39 −0 .github/workflows/publish.yaml
  3. +1 −0 .npmrc
  4. +3 −1 modules/tinymce/Gruntfile.js
  5. +4 −4 modules/tinymce/src/plugins/paste/main/ts/core/WordFilter.ts
  6. +3 −1 package.json
  7. +1 −1 yarn.lock
32 changes: 32 additions & 0 deletions .github/workflows/build-lint-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build, Lint and Test
on:
push:
branches:
- release/5.10
pull_request:
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
jobs:
build-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x

- name: Install yarn
run: |
npm i -g yarn
yarn -v
- name: Build
run: |
yarn install
yarn build
- name: Lint
run: |
yarn eslint
39 changes: 39 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish to npmjs
on:
push:
tags:
- v*.*.*
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Install yarn
run: |
npm i -g yarn
yarn -v
- name: Setup version and scope env
run: |
echo "GITHUB_REF=${GITHUB_REF#refs/*/}"
echo "VERSION=${GITHUB_REF#refs/*/}" | sed 's/v//' >> $GITHUB_ENV
- name: Install Dependencies
run: |
yarn install
- name: Build
env:
VERSION: ${{ env.VERSION }}
SCOPE: "@cnblogs"
run: |
yarn build
- name: Publish
run: |
echo "VERSION: ${VERSION}, SCOPE: ${SCOPE}"
npm run publish-ci
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
4 changes: 3 additions & 1 deletion modules/tinymce/Gruntfile.js
Original file line number Diff line number Diff line change
@@ -32,6 +32,8 @@ const stripSourceMaps = function (data) {

module.exports = function (grunt) {
const packageData = grunt.file.readJSON('package.json');
const scope = process.env.SCOPE || '';
packageData.version = (process.env.VERSION || packageData.version).replace(/^[vV]/, '');
const BUILD_VERSION = packageData.version + (process.env.BUILD_NUMBER ? '-' + process.env.BUILD_NUMBER : '');

// Determine the release date
@@ -572,7 +574,7 @@ module.exports = function (grunt) {
}));

zip.addData('package.json', jsonToBuffer({
'name': 'tinymce',
'name': (scope ? scope + '/' : '') + 'tinymce',
'version': packageData.version,
'repository': {
'type': 'git',
8 changes: 4 additions & 4 deletions modules/tinymce/src/plugins/paste/main/ts/core/WordFilter.ts
Original file line number Diff line number Diff line change
@@ -51,9 +51,9 @@ const isNumericList = (text: string): boolean => {
/^[ivxlmcd]+\.[ \u00a0]/, // Roman lower case
/^[a-z]{1,2}[\.\)][ \u00a0]/, // Alphabetical a-z
/^[A-Z]{1,2}[\.\)][ \u00a0]/, // Alphabetical A-Z
/^[0-9]+\.[ \u00a0]/, // Numeric lists
/^[0-9]+[\.\u0029\uff09][ \u00a0]/, // Numeric lists
/^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/, // Japanese
/^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/ // Chinese
/^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/, // Chinese
];

text = text.replace(/^[\u00a0 ]+/, '');
@@ -201,10 +201,10 @@ const convertFakeListsToProperLists = (node: WordAstNode) => {
continue;
}

// Detect ordered lists 1., a. or ixv.
// Detect ordered lists 1., a., 1) or ixv.
if (isNumericList(nodeText)) {
// Parse OL start number
const matches = /([0-9]+)\./.exec(nodeText);
const matches = /([0-9]+)[.\u0029\uff09]/.exec(nodeText);
let start = 1;
if (matches) {
start = parseInt(matches[1], 10);
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -29,7 +29,8 @@
"phantomjs-test": "yarn -s grunt phantomjs-auto",
"phantomjs-test-manual": "yarn -s grunt phantomjs-manual",
"bedrock": "bedrock --customRoutes modules/tinymce/src/core/test/json/routes.json --polyfills Promise Symbol",
"test-one": "yarn tsc && yarn bedrock-auto -b chrome-headless -f"
"test-one": "yarn tsc && yarn bedrock-auto -b chrome-headless -f",
"publish-ci": "extract-zip ./modules/tinymce/dist/tinymce_${VERSION}_component.zip ${PWD}/modules/tinymce/dist/tinymce_component && npm publish --access public ./modules/tinymce/dist/tinymce_component"
},
"devDependencies": {
"@ephox/bedrock-client": "^11.3.2",
@@ -48,6 +49,7 @@
"emojilib": "^2.4.0",
"eslint": "^7.0.0",
"eslint-plugin-notice": "^0.9.10",
"extract-zip": "^2.0.1",
"fast-check": "^1.18.1",
"grunt": "^1.0.2",
"grunt-contrib-clean": "^2.0.0",
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
@@ -4942,7 +4942,7 @@ extglob@^2.0.4:
snapdragon "^0.8.1"
to-regex "^3.0.1"

extract-zip@^2.0.0:
extract-zip@^2.0.0, extract-zip@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-2.0.1.tgz#663dca56fe46df890d5f131ef4a06d22bb8ba13a"
integrity sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==