8000 bug fix : \n in plantuml · cheoljoo/doxygen_perlmod_python@f88f94e · GitHub
[go: up one dir, main page]

Skip to content

Commit f88f94e

Browse files
author
charles.lee
committed
bug fix : \n in plantuml
1 parent 972df35 commit f88f94e

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ all:
22
make test1
33

44
test1:
5+
cd src; if [ ! -e mysetting.py ]; then cp -f mysetting_example.py mysetting.py; echo "===========.py"; echo "!! edit mysetting.py"; exit 4; fi
56
cd test-1; touch plantuml.jar
67
-cd test-1; doxygen
78
cd test-1/output/perlmod; rm -f mysetting.py sample-test.py doxy2py.pl
@@ -12,6 +13,7 @@ test1:
1213
cd test-1/output/perlmod; python3 sample-test.py --outfile=output.md
1314

1415
testserver:
16+
cd src; if [ ! -e mysetting.py ]; then cp -f mysetting_example.py mysetting.py; echo "===========.py"; echo "!! edit mysetting.py"; exit 4; fi
1517
cd test-server; rm -f plantuml.jar ; touch plantuml.jar
1618
-cd test-server; doxygen
1719
cd test-server/output/perlmod; rm -f mysetting.py sample-server.py doxy2py.pl
@@ -22,6 +24,7 @@ testserver:
2224
cd test-server/output/perlmod; python3 sample-server.py --outfile=output.html
2325

2426
testmako:
27+
cd src; if [ ! -e mysetting.py ]; then cp -f mysetting_example.py mysetting.py; echo "===========.py"; echo "!! edit mysetting.py"; exit 4; fi
2528
cd test-mako; rm -f plantuml.jar ; touch plantuml.jar
2629
-cd test-mako; doxygen
2730
cd test-mako/output/perlmod; rm -f mysetting.py sample-mako.py class.mako doxy2py.pl
@@ -32,3 +35,8 @@ testmako:
3235
cd test-mako/output/perlmod; perl doxy2py.pl
3336
cd test-mako/output/perlmod; python3 sample-mako.py --infile=class.mako
3437

38+
re:
39+
cd src; if [ ! -e mysetting.py ]; then cp -f mysetting_example.py mysetting.py; echo "===========.py"; echo "!! edit mysetting.py"; exit 4; fi
40+
cd region; ln -s ../src/mysetting.py mysetting.py
41+
cd region; perl doxy2py.pl
42+
cd region; python3 sample-server.py --outfile=output.html

src/doxy2py.pl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
sub change_special_code {
88
my ($s) = @_;
99
$s =~ s/\'/\\\'/g;
10+
$s =~ s/\\/\\\\/g;
1011
return $s;
1112
}
1213

File renamed without changes.

src/sample.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import sys,os
2-
sys.path.append(os.getcwd())
2+
sys.path.insert(0,os.getcwd())
33
import DoxyDocs
44
import argparse
55
import mysetting
@@ -216,11 +216,14 @@ def runHtml(self):
216216
self.plantumlCnt += 1
217217
with open('test-{c}.puml'.format(c=self.plantumlCnt),'w') as f:
218218
f.write('@startuml test-{c}.png\n'.format(c=self.plantumlCnt))
219+
p = p.replace('\\n','\\r')
219220
f.write(p)
220221
f.write('\n@enduml\n')
221222
proxylink = '{proxy}&src={puml}/{file}'.format(proxy=mysetting.myPlantumlServerProxy , puml=mysetting.mySrcDirHttp , file='test-{c}.puml'.format(c=self.plantumlCnt))
222223
pnglink = '../../../img/{file}'.format(proxy=mysetting.myPlantumlServerProxy , puml=mysetting.mySrcDirHttp , file='test-{c}.png'.format(c=self.plantumlCnt))
223224
self.print(2,'''<img src="{src}" onerror="this.onerror=null;this.src='{png}';" alt="test-{c}.puml">'''.format(src=proxylink,png=pnglink,c=self.plantumlCnt))
225+
#print('''<img src="{src}" onerror="this.onerror=null;this.src='{png}';" alt="test-{c}.puml">'''.format(src=proxylink,png=pnglink,c=self.plantumlCnt))
226+
#print(mysetting.myPlantumlServerProxy,mysetting.mySrcDirHttp)
224227

225228
# Table
226229
self.print(2,'<table>')

0 commit comments

Comments
 (0)
0