From 588bca23113bb48028b9c1365e0e47dc94953f38 Mon Sep 17 00:00:00 2001 From: Shuhei Iitsuka Date: Fri, 14 Jan 2022 16:47:23 +0900 Subject: [PATCH 1/3] Update style-check.yml --- .github/workflows/style-check.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/style-check.yml b/.github/workflows/style-check.yml index 20262f18..3fe9dced 100644 --- a/.github/workflows/style-check.yml +++ b/.github/workflows/style-check.yml @@ -45,6 +45,6 @@ jobs: steps: - uses: actions/checkout@v2 - name: markdownlint - uses: nosborn/github-action-markdown-cli@018fc8b964d4d364519e7cbcda29b6b9bf3f0ba3 - with: - files: '**/*.md' + uses: nosborn/github-action-markdown-cli@018fc8b964d4d364519e7cbcda29b6b9bf3f0ba3 + with: + files: '**/*.md' From aaa34ebb21dbf435c9b50b392a7165dafaa50870 Mon Sep 17 00:00:00 2001 From: Shuhei Iitsuka Date: Fri, 14 Jan 2022 17:04:43 +0900 Subject: [PATCH 2/3] Add custom markdownlint config --- .github/workflows/style-check.yml | 1 + .markdownlint.yaml | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 .markdownlint.yaml diff --git a/.github/workflows/style-check.yml b/.github/workflows/style-check.yml index 3fe9dced..efe51ab1 100644 --- a/.github/workflows/style-check.yml +++ b/.github/workflows/style-check.yml @@ -48,3 +48,4 @@ jobs: uses: nosborn/github-action-markdown-cli@018fc8b964d4d364519e7cbcda29b6b9bf3f0ba3 with: files: '**/*.md' + config_file: .markdownlint.yaml diff --git a/.markdownlint.yaml b/.markdownlint.yaml new file mode 100644 index 00000000..c427f71e --- /dev/null +++ b/.markdownlint.yaml @@ -0,0 +1,4 @@ +default: true + +MD013: + code_blocks: false From 1e7b17775dc799ca62546d0b2d7302c3b369cdce Mon Sep 17 00:00:00 2001 From: Shuhei Iitsuka Date: Fri, 14 Jan 2022 17:09:51 +0900 Subject: [PATCH 3/3] Lint the JavaScript README --- javascript/README.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/javascript/README.md b/javascript/README.md index cb904d87..4c347fab 100644 --- a/javascript/README.md +++ b/javascript/README.md @@ -1,7 +1,8 @@ # BudouX JavaScript module -BudouX is a standalone, small, and language-neutral phrase segmenter tool that provides beautiful and legible line breaks. +BudouX is a standalone, small, and language-neutral phrase segmenter tool that +provides beautiful and legible line breaks. For more details about the project, please refer to the [project README](https://github.com/google/budoux/). @@ -62,7 +63,8 @@ const parser = new Parser(model); ## Web component -BudouX also has a custom element to make it easy to integrate the parser with your website. +BudouX also has a custom element to make it easy to integrate the parser with +your website. All you have to do is wrap sentences with the `` tag. ```html @@ -75,7 +77,8 @@ In order to enable the custom element, you can simply add this line to load the ``` -Otherwise, if you wish to bundle the component with the rest of your source code, you can import the component as shown below. +Otherwise, if you wish to bundle the component with the rest of your source code, +you can import the component as shown below. ```javascript import 'budoux/module/webcomponents/budoux-ja'; @@ -127,11 +130,16 @@ Options: ### Attributes - thres - - The threshold value to control the granularity of output chunks. Smaller value returns more granular chunks. (default: 1000). + - The threshold value to control the granularity of output chunks. + Smaller value returns more granular chunks. (default: 1000). ## Caveat -BudouX supports HTML inputs and outputs HTML strings with markup applied to wrap phrases, but it's not meant to be used as an HTML sanitizer. **BudouX doesn't sanitize any inputs.** Malicious HTML inputs yield malicious HTML outputs. Please use it with an appropriate sanitizer library if you don't trust the input. +BudouX supports HTML inputs and outputs HTML strings with markup applied to wrap +phrases, but it's not meant to be used as an HTML sanitizer. +**BudouX doesn't sanitize any inputs.** +Malicious HTML inputs yield malicious HTML outputs. +Please use it with an appropriate sanitizer library if you don't trust the input. ## Author