[kupu-checkins] r34325 - in kupu/trunk/kupu/plone: . tests tests/input tests/output
duncan at codespeak.net
duncan at codespeak.net
Tue Nov 7 14:45:11 CET 2006
Author: duncan
Date: Tue Nov 7 14:45:09 2006
New Revision: 34325
Modified:
kupu/trunk/kupu/plone/html2captioned.py
kupu/trunk/kupu/plone/tests/input/simple.in
kupu/trunk/kupu/plone/tests/output/simple.out
kupu/trunk/kupu/plone/tests/runme.cmd
Log:
Transform wasn't converting back urls where the uid wasn't in the last element.
Modified: kupu/trunk/kupu/plone/html2captioned.py
==============================================================================
--- kupu/trunk/kupu/plone/html2captioned.py (original)
+++ kupu/trunk/kupu/plone/html2captioned.py Tue Nov 7 14:45:09 2006
@@ -59,7 +59,7 @@
</div>
'''
-UID_PATTERN = re.compile('(?P<tag><(?:a|img) [^>]*(?:src|href)=")(?P<url>[^"]*resolveuid/(?P<uid>[^"#? ]*))')
+UID_PATTERN = re.compile('(?P<tag><(?:a|img) [^>]*(?:src|href)=")(?P<url>[^"]*resolveuid/(?P<uid>[^/"#? ]*))')
class HTMLToCaptioned:
"""Transform which adds captions to images embedded in HTML"""
Modified: kupu/trunk/kupu/plone/tests/input/simple.in
==============================================================================
--- kupu/trunk/kupu/plone/tests/input/simple.in (original)
+++ kupu/trunk/kupu/plone/tests/input/simple.in Tue Nov 7 14:45:09 2006
@@ -1,2 +1,3 @@
<div>Simple text containing an embedded image</div>
<p><img class="image-left captioned" height="144" alt="picture alt text" src="resolveuid/104ede98d4c7c8eaeaa3b984f7395979" width="120"/></p>
+<p><img class="image-left captioned" height="144" alt="picture alt text" src="resolveuid/104ede98d4c7c8eaeaa3b984f7395979/image_thumb" width="120"/></p>
Modified: kupu/trunk/kupu/plone/tests/output/simple.out
==============================================================================
--- kupu/trunk/kupu/plone/tests/output/simple.out (original)
+++ kupu/trunk/kupu/plone/tests/output/simple.out Tue Nov 7 14:45:09 2006
@@ -4,3 +4,8 @@
</div>
<div class="image-caption">Test image caption</div>
</div>
+<div class="image-left captioned" style="width:120px;">
+ <div style="width:120px;"><img height="144" src="[url for 104ede98d4c7c8eaeaa3b984f7395979]/image_thumb" width="120" alt="image 104ede98d4c7c8eaeaa3b984f7395979"/>
+ </div>
+ <div class="image-caption">Test image caption</div>
+</div>
Modified: kupu/trunk/kupu/plone/tests/runme.cmd
==============================================================================
--- kupu/trunk/kupu/plone/tests/runme.cmd (original)
+++ kupu/trunk/kupu/plone/tests/runme.cmd Tue Nov 7 14:45:09 2006
@@ -8,10 +8,10 @@
set INSTANCE_HOME=%PLONEHOME%\Data
set SOFTWARE_HOME=%PLONEHOME%\Zope\lib\python
@set PYTHON=C:\Plone20\Zope\bin\python.exe
-"%PYTHON%" %~D0%~P0test_browserSupportsKupu.py %2
+rem "%PYTHON%" %~D0%~P0test_browserSupportsKupu.py %2
rem "%PYTHON%" %~D0%~P0test_librarymanager.py
rem "%PYTHON%" %~D0%~P0test_html2captioned.py
rem "%PYTHON%" %~D0%~P0test_resourcetypemapper.py
rem "%PYTHON%" %~D0%~P0test_urls.py
-rem "%PYTHON%" "%~D0%~P0runalltests.py" %2
+"%PYTHON%" "%~D0%~P0runalltests.py" %2
endlocal
More information about the kupu-checkins
mailing list