File tree Expand file tree Collapse file tree 4 files changed +31
-28
lines changed
Expand file tree Collapse file tree 4 files changed +31
-28
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ testdata_dir = "testdata"
33tmp_dir = " tmp"
44
55[build ]
6- args_bin = [" --dir=assets/svg" , " --prefix=SVG " ]
6+ args_bin = [" --dir=assets/svg" , " --prefix=SVG_ " ]
77bin = " ./tmp/main"
88cmd = " go build -o ./tmp/main ."
99delay = 1000
Original file line number Diff line number Diff line change 1- # This workflow will build a golang project
2- # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
1+ # # This workflow will build a golang project
2+ # # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
33
4- name : Go
4+ # name: Go
55
6- on :
7- push :
8- branches : [ "main" ]
9- pull_request :
10- branches : [ "main" ]
6+ # on:
7+ # push:
8+ # branches: [ "main" ]
9+ # pull_request:
10+ # branches: [ "main" ]
1111
12- jobs :
12+ # jobs:
1313
14- build :
15- runs-on : ubuntu-latest
16- steps :
17- - uses : actions/checkout@v4
14+ # build:
15+ # runs-on: ubuntu-latest
16+ # steps:
17+ # - uses: actions/checkout@v4
1818
19- - name : Set up Go
20- uses : actions/setup-go@v4
21- with :
22- go-version : ' 1.24.4'
19+ # - name: Set up Go
20+ # uses: actions/setup-go@v4
21+ # with:
22+ # go-version: '1.24.4'
2323
24- - name : Build
25- run : go build -v ./...
24+ # - name: Build
25+ # run: go build -v ./...
Original file line number Diff line number Diff line change 1- export { default as SVG_GOLANG_1_ } from "./!golang-(((1))).svg?no-inline" ;
1+ export { default as SVG_GOLANG_1 } from "./!golang-(((1))).svg?no-inline" ;
22export { default as SVG_RUST_LOGO } from "./!rust-logo.svg?no-inline" ;
3- export { default as SVGHEADER_BLURRY_COLOR_EFFECT_MIN } from "./header-blurry-color-effect-min.png" ;
4- export { default as SVGHEADER_BLURRY_COLOR_EFFECT } from "./header-blurry-color-effect.png" ;
5- export { default as SVGJAVASCRIPT_LOGO } from "./javascript-logo.svg" ;
6- export { default as SVGPKG_CARD_CORNER_BLOB } from "./pkg-card-corner-blob.png" ;
7- export { default as SVGTRUST_PILOT_STARS_AND_LOGO } from "./trust-pilot-stars-and-logo.png" ;
3+ export { default as SVG_HEADER_BLURRY_COLOR_EFFECT_MIN } from "./header-blurry-color-effect-min.png" ;
4+ export { default as SVG_HEADER_BLURRY_COLOR_EFFECT } from "./header-blurry-color-effect.png" ;
5+ export { default as SVG_JAVASCRIPT_LOGO } from "./javascript-logo.svg" ;
6+ export { default as SVG_PKG_CARD_CORNER_BLOB } from "./pkg-card-corner-blob.png" ;
7+ export { default as SVG_TRUST_PILOT_STARS_AND_LOGO } from "./trust-pilot-stars-and-logo.png" ;
Original file line number Diff line number Diff line change @@ -86,11 +86,14 @@ func GenerateAsset(directoryPath string) {
8686
8787 //Normalizing Name for JS variable
8888 normalizeNameRegex := regexp .MustCompile (`[-. !)(]` )
89- underscorredFileNamd := normalizeNameRegex .ReplaceAllString (fileNameWithoutExtension , "_" )
89+ underscorredFileName := normalizeNameRegex .ReplaceAllString (fileNameWithoutExtension , "_" )
90+
91+ // remove starting and trailing underscores
92+ underscorredFileName = strings .Trim (underscorredFileName , "_" )
9093
9194 // remove morethan two underscore
9295 removedMoreUnderscoreRegex := regexp .MustCompile (`_{2,}` )
93- normalizedFileName := removedMoreUnderscoreRegex .ReplaceAllString (underscorredFileNamd , "_" )
96+ normalizedFileName := removedMoreUnderscoreRegex .ReplaceAllString (underscorredFileName , "_" )
9497
9598 if isValidFiles (name ) {
9699
You can’t perform that action at this time.
0 commit comments