Modify ↓
#6483 closed defect (fixed)
Image macro documentation for defining width is incorrect
| Reported by: | sid | Owned by: | osimons |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.11 |
| Component: | wiki system | Version: | devel |
| Severity: | normal | Keywords: | imagemacro |
| Cc: | Branch: | ||
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
Description
The TracWikiMacros page incorrectly says that you can use this syntax to limit a displayed image width:
[[Image(pic.png, 120px)]]
The syntax that works is:
[[Image(pic.png, 120)]]
Here is a patch to fix that page and the code:
-
macros.py
291 291 Examples: 292 292 {{{ 293 293 [[Image(photo.jpg)]] # simplest 294 [[Image(photo.jpg, 120 px)]] # with size294 [[Image(photo.jpg, 120)]] # with image width size 295 295 [[Image(photo.jpg, right)]] # aligned by keyword 296 296 [[Image(photo.jpg, nolink)]] # without link to source 297 297 [[Image(photo.jpg, align=right)]] # aligned by attribute
Attachments (0)
Change History (4)
comment:1 by , 18 years ago
| Milestone: | → 0.11.1 |
|---|---|
| Owner: | changed from to |
comment:2 by , 18 years ago
Yeah, it's preferable to work as advertised, this might even be a regression from 0.10.
comment:3 by , 18 years ago
| Component: | general → wiki |
|---|---|
| Keywords: | imagemacro added |
| Milestone: | 0.11.1 → 0.11 |
| Resolution: | → fixed |
| Status: | new → closed |
Fixed in [6319]. Closing.
Note:
See TracTickets
for help on using tickets.



Hmm. Wonder if the best would be to support both? If you do
width=120pxas a named argument, it works fine. Would be natural to keep the same behavior also without the keyword? If so, we could change the regexp like this:trac/wiki/macros.py
%?$')I'll also use your wording to make it explicity that we set the width attribute.
Looks OK?