?? macros.py
字號(hào):
import unittestimport trac.wiki.macrosfrom trac.wiki.tests import formatterIMAGE_MACRO_TEST_CASES=u"""============================== source: Image, no other arguments[[Image(source:test.png)]]------------------------------<p><a style="padding:0; border:none" href="/browser/test.png"><img src="/browser/test.png?format=raw" alt="source:test.png" title="source:test.png" /></a></p>------------------------------[[Image(...)]]============================== source: Image, nolink[[Image(source:test.png, nolink)]]------------------------------<p><img src="/browser/test.png?format=raw" alt="source:test.png" title="source:test.png" /></p>------------------------------============================== source: Image, normal args[[Image(source:test.png, align=left, title=Test)]]------------------------------<p><a style="padding:0; border:none" href="/browser/test.png"><img src="/browser/test.png?format=raw" alt="source:test.png" style="float:left" title="Test" /></a></p>------------------------------============================== source: Image, size arg[[Image(source:test.png, 30%)]]------------------------------<p><a style="padding:0; border:none" href="/browser/test.png"><img width="30%" alt="source:test.png" title="source:test.png" src="/browser/test.png?format=raw" /></a></p>------------------------------============================== source: Image, keyword alignment[[Image(source:test.png, right)]]------------------------------<p><a style="padding:0; border:none" href="/browser/test.png"><img src="/browser/test.png?format=raw" alt="source:test.png" style="float:right" title="source:test.png" /></a></p>------------------------------============================== http: Image, nolink[[Image(http://www.edgewall.com/gfx/shredder.png, nolink)]]------------------------------<p><img src="http://www.edgewall.com/gfx/shredder.png" alt="http://www.edgewall.com/gfx/shredder.png" title="http://www.edgewall.com/gfx/shredder.png" /></p>------------------------------"""def suite(): suite = unittest.TestSuite() suite.addTest(formatter.suite(IMAGE_MACRO_TEST_CASES, file=__file__)) return suiteif __name__ == '__main__': unittest.main(defaultTest='suite')
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -