Skip to content

Commit

Permalink
Normalize file encoding and EOLs
Browse files Browse the repository at this point in the history
  • Loading branch information
rdipardo committed Jan 31, 2025
1 parent 2ca22ca commit 5ef3334
Show file tree
Hide file tree
Showing 15 changed files with 1,079 additions and 1,079 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
working-directory: Legacy-v2.1

- name: Upload ${{ env.PLUGIN_NAME }}.${{ env.RELEASE_VERSION }}.win32
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: ${{ env.PLUGIN_NAME }}.${{ env.RELEASE_VERSION }}.win32
path: |
Expand All @@ -46,7 +46,7 @@ jobs:

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-dotnet@87b7050bc53ea08284295505d98d2aa94301e852 # v4.2.0
- uses: actions/setup-dotnet@3951f0dfe7a07e2313ec93c75700083e2005cbab # v4.3.0
with:
dotnet-version: 8.0.x

Expand All @@ -61,7 +61,7 @@ jobs:
working-directory: WebEdit

- name: Upload ${{ env.PLUGIN_NAME }}.${{ env.RELEASE_VERSION }}.${{ matrix.target_runtime }}
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: ${{ env.PLUGIN_NAME }}.${{ env.RELEASE_VERSION }}.${{ matrix.target_runtime }}
path: |
Expand Down
20 changes: 10 additions & 10 deletions FixSpaceAtEols.cmd
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
@echo off
echo Removing whitespace at EOLs...
for /d %%d in (*) do (
pushd %%d
for /r %%f in (*.cs,*.resx,*.targets,*.config) do (
echo %%f
sed -i -r -e "s/[\t\r ]+$//" -e "s/$/\r/" "%%f"
)
popd
)
@echo off
echo Removing whitespace at EOLs...
for /d %%d in (*) do (
pushd %%d
for /r %%f in (*.cs,*.resx,*.targets,*.config) do (
echo %%f
sed -i -r -e "s/[\t\r ]+$//" -e "s/$/\r/" "%%f"
)
popd
)
248 changes: 124 additions & 124 deletions Legacy-v2.1/Src/Config/WebEdit.ini
Original file line number Diff line number Diff line change
@@ -1,124 +1,124 @@
[Commands]
; Syntax: <Item name>=<Left text>|<Right text>
; Known escape sequences: \\ \t \n \r
&A=<a href="#">|</a>
Div &Class=<div class="">|</div>
Div &Id=<div id="">|</div>
&Em=<em>|</em>
H&1=<h1>|</h1>
H&2=<h2>|</h2>
H&3=<h3>|</h3>
H&4=<h4>|</h4>
H&5=<h5>|</h5>
H&6=<h6>|</h6>
&Li=<li>|</li>
&Ol=<ol>|</ol>
&P=<p>|</p>
Spa&n=<span>|</span>
&Strong=<strong>|</strong>
St&yle=<style>|</style>
&Table=<table>|</table>
T&d=<td>|</td>
T&r=<tr>|</tr>
&Ul=<ul>|</ul>

; Free accelerators: bfghjkmqvwxz0789

[Toolbar]
; Syntax: <slot number>=<fileName>.bmp
; The bitmap files should be in the plugins\Config folder.
; Example:
1=a.bmp
2=dc.bmp
3=di.bmp
4=em.bmp
5=h1.bmp
6=h2.bmp
7=h3.bmp
8=h4.bmp
9=h5.bmp
10=h6.bmp
11=li.bmp
12=ol.bmp
13=p.bmp
14=sp.bmp
15=s.bmp
16=st.bmp
17=t.bmp
18=td.bmp
19=tr.bmp
20=ul.bmp

[Tags]
; Tags are replaced with their Replacement when you select the
; "WebEdit\Replace Tag" menu item (Alt+Enter by default).
; Syntax: <Tag>=<Replacement>
; Tags can contain characters a-z, A-Z, 0-9. Maximum length of a tag is 32
; characters. The number of Tags is not limited. The pipe character "|" marks
; the caret position after the tag replacement.
; Known escape sequences:
; \c = system clipboard contents
; \i = indentation
; \n = new line
; \t = tab character
; \| = |
; \\ = \
m=MODULE \c;\n\n(* ------------------------------------------------------------------------\n * (C) 2010 by Alexander Iljin\n * ------------------------------------------------------------------------ *)\n\nIMPORT\n\i|;\n\n(** ------------------------------------------------------------------------\n * TODO: Add module description\n * ----------------------------------------------------------------------- *)\n\nEND \c.\n
rep=REPEAT\n\i\nUNTIL |;
a=ASSERT (|);
c=CASE | OF\n\|\i:\nEND;
d=DEC (|);\n
di=DEC (i);\n|
if=IF | THEN\n\i\nEND;
ife=IF | THEN\n\i\nELSE\n\i\nEND;
i=INC (|);\n
ii=INC (i);\n|
rec=RECORD\n\i|\nEND;
whi=i := 0;\nWHILE i < c DO\n\i|\n\iINC (i);\nEND;
r=RETURN res
w=WHILE | DO\n\i\n\iINC (i);\nEND;
p=PROCEDURE \c|;\nBEGIN\n\i\nEND \c;\n

;html
div=<div>|</div>
h1=<h1>|</h1>
h2=<h2>|</h2>
h3=<h3>|</h3>
h4=<h4>|</h4>
h5=<h5>|</h5>
id=id="|"
class=class="|"
header=<header>|</header>
nav=<nav>|</nav>
canvas=<canvas>|</canvas>
section=<section>|</section>
article=<article>|</article>
footer=<footer>|</footer>
p=<p>|</p>

;css section by https://sourceforge.net/users/webdorq/ -- Many thanks to Paul Irish and Jonathan Neal at http://css3please.com/

;rounded corners
round= -moz-border-radius: 12px; /* FF1+ */ \n\i -webkit-border-radius: 12px; /* Saf3-4 */\n\i border-radius: 12px; /* Opera 10.5, IE 9, Saf5, Chrome */

;box shadow
shadow=-moz-box-shadow: 0px 0px 4px #ffffff; /* FF3.5+ */\n\i -webkit-box-shadow: 0px 0px 4px #ffffff; /* Saf3.0+, Chrome */\n\i box-shadow: 0px 0px 4px #ffffff; /* Opera 10.5, IE 9 */

;gradient
grad= background-color: #444444;\n\i background-image: -moz-linear-gradient(top, #444444, #999999); /* FF3.6 */\n\i background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #444444),color-stop(1, #999999)); /* Saf4+, Chrome */\n\i filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#444444', EndColorStr='#999999'); /* IE6,IE7 */\n\i -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#444444', EndColorStr='#999999')"; /* IE8 */

;rgba
rgba= background-color: #B4B490;\n\i background-color: rgba(180, 180, 144, 0.6); /* FF3+, Saf3+, Opera 10.10+, Chrome, IE9 */\n\i filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#99B4B490',EndColorStr='#99B4B490'); /* IE6,IE7 */\n\i -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#99B4B490',EndColorStr='#99B4B490')"; /* IE8 */

;rotate
rotate= -moz-transform: rotate(7.5deg); /* FF3.5+ */\n\i -o-transform: rotate(7.5deg); /* Opera 10.5 */\n\i -webkit-transform: rotate(7.5deg); /* Saf3.1+, Chrome */\n\i -ms-transform: rotate(7.5deg); /* IE9 */\n\i transform: rotate(7.5deg); \n\i filter: progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', /* IE6,IE7 */ \n\i M11=0.9914448613738104, M12=-0.13052619222005157,M21=0.13052619222005157, M22=0.9914448613738104); \n\i -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.9914448613738104, M12=-0.13052619222005157, M21=0.13052619222005157, M22=0.9914448613738104,sizingMethod='auto expand')"; \n\i /* IE8 */\n\i zoom: 1;

;transition
trans= -moz-transition: all 0.3s ease-out; /* FF3.7+ */\n\i -o-transition: all 0.3s ease-out; /* Opera 10.5 */\n\i -webkit-transition: all 0.3s ease-out; /* Saf3.2+, Chrome */\n\i transition: all 0.3s ease-out;

;textshadow
txtshadow= text-shadow: 1px 1px 3px #888; /* FF3.5+, Opera 9+, Saf1+, Chrome */

;fontface
font=@font-face {\n\i font-family: 'WebFont';\n\i src: url('myfont.eot'); /* IE6-8 */\n\i src: local('?'),\n\i url('myfont.woff') format('woff'), /* FF3.6, IE9 */\n\i url('myfont.ttf') format('truetype'); /* Saf3+,Chrome,FF3.5,Opera10+ */\n\i }

[Commands]
; Syntax: <Item name>=<Left text>|<Right text>
; Known escape sequences: \\ \t \n \r
&A=<a href="#">|</a>
Div &Class=<div class="">|</div>
Div &Id=<div id="">|</div>
&Em=<em>|</em>
H&1=<h1>|</h1>
H&2=<h2>|</h2>
H&3=<h3>|</h3>
H&4=<h4>|</h4>
H&5=<h5>|</h5>
H&6=<h6>|</h6>
&Li=<li>|</li>
&Ol=<ol>|</ol>
&P=<p>|</p>
Spa&n=<span>|</span>
&Strong=<strong>|</strong>
St&yle=<style>|</style>
&Table=<table>|</table>
T&d=<td>|</td>
T&r=<tr>|</tr>
&Ul=<ul>|</ul>

; Free accelerators: bfghjkmqvwxz0789

[Toolbar]
; Syntax: <slot number>=<fileName>.bmp
; The bitmap files should be in the plugins\Config folder.
; Example:
1=a.bmp
2=dc.bmp
3=di.bmp
4=em.bmp
5=h1.bmp
6=h2.bmp
7=h3.bmp
8=h4.bmp
9=h5.bmp
10=h6.bmp
11=li.bmp
12=ol.bmp
13=p.bmp
14=sp.bmp
15=s.bmp
16=st.bmp
17=t.bmp
18=td.bmp
19=tr.bmp
20=ul.bmp

[Tags]
; Tags are replaced with their Replacement when you select the
; "WebEdit\Replace Tag" menu item (Alt+Enter by default).
; Syntax: <Tag>=<Replacement>
; Tags can contain characters a-z, A-Z, 0-9. Maximum length of a tag is 32
; characters. The number of Tags is not limited. The pipe character "|" marks
; the caret position after the tag replacement.
; Known escape sequences:
; \c = system clipboard contents
; \i = indentation
; \n = new line
; \t = tab character
; \| = |
; \\ = \
m=MODULE \c;\n\n(* ------------------------------------------------------------------------\n * (C) 2010 by Alexander Iljin\n * ------------------------------------------------------------------------ *)\n\nIMPORT\n\i|;\n\n(** ------------------------------------------------------------------------\n * TODO: Add module description\n * ----------------------------------------------------------------------- *)\n\nEND \c.\n
rep=REPEAT\n\i\nUNTIL |;
a=ASSERT (|);
c=CASE | OF\n\|\i:\nEND;
d=DEC (|);\n
di=DEC (i);\n|
if=IF | THEN\n\i\nEND;
ife=IF | THEN\n\i\nELSE\n\i\nEND;
i=INC (|);\n
ii=INC (i);\n|
rec=RECORD\n\i|\nEND;
whi=i := 0;\nWHILE i < c DO\n\i|\n\iINC (i);\nEND;
r=RETURN res
w=WHILE | DO\n\i\n\iINC (i);\nEND;
p=PROCEDURE \c|;\nBEGIN\n\i\nEND \c;\n

;html
div=<div>|</div>
h1=<h1>|</h1>
h2=<h2>|</h2>
h3=<h3>|</h3>
h4=<h4>|</h4>
h5=<h5>|</h5>
id=id="|"
class=class="|"
header=<header>|</header>
nav=<nav>|</nav>
canvas=<canvas>|</canvas>
section=<section>|</section>
article=<article>|</article>
footer=<footer>|</footer>
p=<p>|</p>

;css section by https://sourceforge.net/users/webdorq/ -- Many thanks to Paul Irish and Jonathan Neal at http://css3please.com/

;rounded corners
round= -moz-border-radius: 12px; /* FF1+ */ \n\i -webkit-border-radius: 12px; /* Saf3-4 */\n\i border-radius: 12px; /* Opera 10.5, IE 9, Saf5, Chrome */

;box shadow
shadow=-moz-box-shadow: 0px 0px 4px #ffffff; /* FF3.5+ */\n\i -webkit-box-shadow: 0px 0px 4px #ffffff; /* Saf3.0+, Chrome */\n\i box-shadow: 0px 0px 4px #ffffff; /* Opera 10.5, IE 9 */

;gradient
grad= background-color: #444444;\n\i background-image: -moz-linear-gradient(top, #444444, #999999); /* FF3.6 */\n\i background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #444444),color-stop(1, #999999)); /* Saf4+, Chrome */\n\i filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#444444', EndColorStr='#999999'); /* IE6,IE7 */\n\i -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#444444', EndColorStr='#999999')"; /* IE8 */

;rgba
rgba= background-color: #B4B490;\n\i background-color: rgba(180, 180, 144, 0.6); /* FF3+, Saf3+, Opera 10.10+, Chrome, IE9 */\n\i filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#99B4B490',EndColorStr='#99B4B490'); /* IE6,IE7 */\n\i -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#99B4B490',EndColorStr='#99B4B490')"; /* IE8 */

;rotate
rotate= -moz-transform: rotate(7.5deg); /* FF3.5+ */\n\i -o-transform: rotate(7.5deg); /* Opera 10.5 */\n\i -webkit-transform: rotate(7.5deg); /* Saf3.1+, Chrome */\n\i -ms-transform: rotate(7.5deg); /* IE9 */\n\i transform: rotate(7.5deg); \n\i filter: progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', /* IE6,IE7 */ \n\i M11=0.9914448613738104, M12=-0.13052619222005157,M21=0.13052619222005157, M22=0.9914448613738104); \n\i -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.9914448613738104, M12=-0.13052619222005157, M21=0.13052619222005157, M22=0.9914448613738104,sizingMethod='auto expand')"; \n\i /* IE8 */\n\i zoom: 1;

;transition
trans= -moz-transition: all 0.3s ease-out; /* FF3.7+ */\n\i -o-transition: all 0.3s ease-out; /* Opera 10.5 */\n\i -webkit-transition: all 0.3s ease-out; /* Saf3.2+, Chrome */\n\i transition: all 0.3s ease-out;

;textshadow
txtshadow= text-shadow: 1px 1px 3px #888; /* FF3.5+, Opera 9+, Saf1+, Chrome */

;fontface
font=@font-face {\n\i font-family: 'WebFont';\n\i src: url('myfont.eot'); /* IE6-8 */\n\i src: local('?'),\n\i url('myfont.woff') format('woff'), /* FF3.6, IE9 */\n\i url('myfont.ttf') format('truetype'); /* Saf3+,Chrome,FF3.5,Opera10+ */\n\i }

6 changes: 3 additions & 3 deletions Legacy-v2.1/Src/MakeReleaseNotes.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
sed -e "1 c CHANGELOG" < Changelog.txt > Changelog.tmp
sed -e "$a\ " -e "$r Changelog.tmp" < WebEdit.txt > ReleaseNotes.%1.txt
del Changelog.tmp
sed -e "1 c CHANGELOG" < Changelog.txt > Changelog.tmp
sed -e "$a\ " -e "$r Changelog.tmp" < WebEdit.txt > ReleaseNotes.%1.txt
del Changelog.tmp
94 changes: 47 additions & 47 deletions Legacy-v2.1/Src/SetVersion.bat
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
@echo off
where sed 2>NUL:
if %errorlevel% NEQ 0 ( goto :EOF )
setlocal
set MAJ=2
set MIN=1
set REV=0
set BUILD=0
IF "%1" NEQ "" ( set "MAJ=%1" ) else ( goto :EOF )
IF "%2" NEQ "" ( set "MIN=%2" ) else ( goto :EOF )
IF "%3" NEQ "" ( set "REV=%3" ) else ( goto :EOF )
IF "%4" NEQ "" ( set "BUILD=%4" )
FOR /F "tokens=* USEBACKQ" %%F IN (`git ls-files -- "Src/*Ver.rc" "Src/*Ver.ob2"`) DO (
sed -i -e "s/\([^0-9]*\)\(\([0-9]\([.,]\)\)\{1,4\}[0-9]\)\(.*\)/\1%MAJ%\4%MIN%\4%REV%\4%BUILD%\5/g" %%F
unix2dos %%F
)
endlocal
:EOF
exit /B %errorlevel%

@rem ===== old script begins here =====

if "%1" == "" (
echo Usage: %~nx0 Ver1 Ver2 [Ver3]
echo Example: %~nx0 2 0
) else (
if "%2" == "" (
echo Error: Ver2 is missing. Run without parameters for help.
) else (
if "%3" == "" (
sed -e "1 s/ v[.0-9]* / v%1.%2 /" < WebEdit.txt > WebEdit.tmp
sed -e "3 s/Version .*,/Version %1.%2,/" < Changelog.txt > Changelog.tmp
sed -e "s@s/$Ver1/.*/@s/$Ver1/%1/@" -e "s@s/$Ver2/.*/@s/$Ver2/%2/@" -e "s@s/$Ver3/.*/@s/$Ver3/0/@" < WebEditVer > WebEditVer.tmp
sed -e "s@s/$Ver1/.*/@s/$Ver1/%1/@" -e "s@s/$Ver2/.*/@s/$Ver2/%2/@" -e "s@s/$Ver3/.*/@s/$Ver3/0/@" < WebEditUVer > WebEditUVer.tmp
) else (
sed -e "1 s/ v[.0-9]* / v%1.%2.%3 /" < WebEdit.txt > WebEdit.tmp
sed -e "3 s/Version .*,/Version %1.%2.%3,/" < Changelog.txt > Changelog.tmp
sed -e "s@s/$Ver1/.*/@s/$Ver1/%1/@" -e "s@s/$Ver2/.*/@s/$Ver2/%2/@" -e "s@s/$Ver3/.*/@s/$Ver3/%3/@" < WebEditVer > WebEditVer.tmp
sed -e "s@s/$Ver1/.*/@s/$Ver1/%1/@" -e "s@s/$Ver2/.*/@s/$Ver2/%2/@" -e "s@s/$Ver3/.*/@s/$Ver3/%3/@" < WebEditUVer > WebEditUVer.tmp
)
del WebEdit.txt Changelog.txt WebEditVer WebEditUVer
ren WebEdit.tmp WebEdit.txt
ren Changelog.tmp Changelog.txt
ren WebEditVer.tmp WebEditVer
ren WebEditUVer.tmp WebEditUVer
)
)
@echo off
where sed 2>NUL:
if %errorlevel% NEQ 0 ( goto :EOF )
setlocal
set MAJ=2
set MIN=1
set REV=0
set BUILD=0
IF "%1" NEQ "" ( set "MAJ=%1" ) else ( goto :EOF )
IF "%2" NEQ "" ( set "MIN=%2" ) else ( goto :EOF )
IF "%3" NEQ "" ( set "REV=%3" ) else ( goto :EOF )
IF "%4" NEQ "" ( set "BUILD=%4" )
FOR /F "tokens=* USEBACKQ" %%F IN (`git ls-files -- "Src/*Ver.rc" "Src/*Ver.ob2"`) DO (
sed -i -e "s/\([^0-9]*\)\(\([0-9]\([.,]\)\)\{1,4\}[0-9]\)\(.*\)/\1%MAJ%\4%MIN%\4%REV%\4%BUILD%\5/g" %%F
unix2dos %%F
)
endlocal
:EOF
exit /B %errorlevel%

@rem ===== old script begins here =====

if "%1" == "" (
echo Usage: %~nx0 Ver1 Ver2 [Ver3]
echo Example: %~nx0 2 0
) else (
if "%2" == "" (
echo Error: Ver2 is missing. Run without parameters for help.
) else (
if "%3" == "" (
sed -e "1 s/ v[.0-9]* / v%1.%2 /" < WebEdit.txt > WebEdit.tmp
sed -e "3 s/Version .*,/Version %1.%2,/" < Changelog.txt > Changelog.tmp
sed -e "s@s/$Ver1/.*/@s/$Ver1/%1/@" -e "s@s/$Ver2/.*/@s/$Ver2/%2/@" -e "s@s/$Ver3/.*/@s/$Ver3/0/@" < WebEditVer > WebEditVer.tmp
sed -e "s@s/$Ver1/.*/@s/$Ver1/%1/@" -e "s@s/$Ver2/.*/@s/$Ver2/%2/@" -e "s@s/$Ver3/.*/@s/$Ver3/0/@" < WebEditUVer > WebEditUVer.tmp
) else (
sed -e "1 s/ v[.0-9]* / v%1.%2.%3 /" < WebEdit.txt > WebEdit.tmp
sed -e "3 s/Version .*,/Version %1.%2.%3,/" < Changelog.txt > Changelog.tmp
sed -e "s@s/$Ver1/.*/@s/$Ver1/%1/@" -e "s@s/$Ver2/.*/@s/$Ver2/%2/@" -e "s@s/$Ver3/.*/@s/$Ver3/%3/@" < WebEditVer > WebEditVer.tmp
sed -e "s@s/$Ver1/.*/@s/$Ver1/%1/@" -e "s@s/$Ver2/.*/@s/$Ver2/%2/@" -e "s@s/$Ver3/.*/@s/$Ver3/%3/@" < WebEditUVer > WebEditUVer.tmp
)
del WebEdit.txt Changelog.txt WebEditVer WebEditUVer
ren WebEdit.tmp WebEdit.txt
ren Changelog.tmp Changelog.txt
ren WebEditVer.tmp WebEditVer
ren WebEditUVer.tmp WebEditUVer
)
)
Loading

0 comments on commit 5ef3334

Please sign in to comment.