Skip to content

Commit

Permalink
Merge pull request #87 from lowdefy/develop
Browse files Browse the repository at this point in the history
@Gervwyk Fix: Use regex selectors in the sanitizeName functions.
  • Loading branch information
Gervwyk authored Feb 20, 2021
2 parents 32f77d2 + 035ae6e commit 99c86b4
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ A Lowdefy block has two files, the block meta data and the block React component
4. Add the `types` to you the lowdefy.yaml. For example:

```yaml
name: may-app
name: my-app
lowdefy: 3.10.0
types:
DisplayBlock:
Expand All @@ -41,7 +41,9 @@ types:
- Getting started with Lowdefy - https://docs.lowdefy.com/tutorial-setup
- Lowdefy docs - https://docs.lowdefy.com
- Lowdefy website - https://lowdefy.com
- Community forum - https://github.com/lowdefy/lowdefy/discussions
- Bug reports and feature requests - https://github.com/lowdefy/lowdefy/issues

## Licence: MIT
## Licence

See the LICENSE.md file for license rights and limitations.
[MIT](https://github.com/lowdefy/blocks-template/blob/main/LICENSE)
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"homepage": "https://lowdefy.com",
"keywords": [
"lowdefy",
"lowdefy-blocks"
"lowdefy blocks"
],
"bugs": {
"url": "https://github.com/lowdefy/lowdefy/issues"
Expand Down
6 changes: 3 additions & 3 deletions webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ const packageJson = require('./package.json');

const sanitizeName = (name) => {
return name
.replace('@', '_at_')
.replace('/', '_slash_')
.replace('-', '_dash_')
.replace(/@/g, '_at_')
.replace(/\//g, '_slash_')
.replace(/-/g, '_dash_')
.replace(/^[a-zA-Z0-9_]/g, '_');
};

Expand Down
6 changes: 3 additions & 3 deletions webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ const port = Number.isInteger(

const sanitizeName = (name) => {
return name
.replace('@', '_at_')
.replace('/', '_slash_')
.replace('-', '_dash_')
.replace(/@/g, '_at_')
.replace(/\//g, '_slash_')
.replace(/-/g, '_dash_')
.replace(/^[a-zA-Z0-9_]/g, '_');
};

Expand Down
6 changes: 3 additions & 3 deletions webpack.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ const packageJson = require('./package.json');

const sanitizeName = (name) => {
return name
.replace('@', '_at_')
.replace('/', '_slash_')
.replace('-', '_dash_')
.replace(/@/g, '_at_')
.replace(/\//g, '_slash_')
.replace(/-/g, '_dash_')
.replace(/^[a-zA-Z0-9_]/g, '_');
};

Expand Down

0 comments on commit 99c86b4

Please sign in to comment.