Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

#3228 closed defect (worksforme)

The ! escape character doesn't handle ` properly

Reported by: landtuna+trac@… Owned by: Jonas Borgström
Priority: normal Milestone:
Component: general Version: 0.9.5
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I would expect the following:

`echo MPD_SECRETWORD=`!``whoami`!`` > ~/.mpd.conf`

to generate a whole line that is in monospace except for the two backticks. (The first backtick puts us in monospace, the second one takes us out, the exclamation point escapes the third backtick so it is displayed, and the fourth backtick returns us to monospace.) Instead, it generates something like:

echo MPD_SECRETWORD=``whoami! > ~/.mpd.conf 

except that the whoami is in a proportional font. I haven't found any combination of exclamation points and backticks that fix this problem.

The main problem is that it is not possible to render a backtick inside a backticked expression, and {{{ !}}} is not always suitable because of its blocked layout.

Attachments (0)

Change History (2)

comment:1 by landtuna+trac@…, 18 years ago

Priority: normallowest
Severity: normaltrivial

Downgrading the priority of this, as I now understand that {{{ and !}}} don't necessarily block their text and are a suitable replacement for backticks in this case.

comment:2 by Christian Boos, 18 years ago

Priority: lowestnormal
Resolution: worksforme
Severity: trivialnormal
Status: newclosed

Yeah, normally `` and {{{}}} can be used to escape each other.

So, for your example, you should write:

`{{{echo MPD_SECRETWORD=`whoami` > ~/.mpd.conf}}}`

which renders as: echo MPD_SECRETWORD=`whoami` > ~/.mpd.conf

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.