Putting "[/text]" inside [text]...[/text] pair
-
- Posts: 2038
- Joined: Tue Nov 29, 2005 8:28 pm
- Location: latiitude 50N longitude 3W
- Contact:
Putting "[/text]" inside [text]...[/text] pair
I'm confused yet again! I want to describe the [text] and [/text] tags in some HTML text but I then have to enclose the entire HTML source in [text] ...[/text] tags so that newLISP can process the entire HTML. Obviously it doesn't work unless I do something to the non-active [text][/text] occurrences but I don't know what. Suggestions welcome...
If you don't use '{' or '}' inside the text, use them instead:
Fanda
Code: Select all
(define (test str)
(println str))
(test {
[text] Just testing... [/text]
})
Code: Select all
=> [text] Just testing... [/text]
-
- Posts: 2038
- Joined: Tue Nov 29, 2005 8:28 pm
- Location: latiitude 50N longitude 3W
- Contact:
... but {,} will not work for more than 2048 characters. What you can do is use the HTML code options: & # 9 1 ; and & # 9 3 ; for [ and ] respectively:
Lutz
ps: I had to put spaces in between so it would not translate in this post
Code: Select all
(set 'str
[text]
this is about the & # 9 2 ; text & # 9 3 ; tag
[/text])
; will display as
; this is about the [text] tag
; in a browser
ps: I had to put spaces in between so it would not translate in this post
-
- Posts: 2038
- Joined: Tue Nov 29, 2005 8:28 pm
- Location: latiitude 50N longitude 3W
- Contact:
And how to do this when reading large code of text that includes [text] and [/text] ? [text][text][/text][/text]
Im unable to get this working.. There seems to be no quoting for for this in normal text files...
Lutz, perhpas the parser function should always seek for the "last" occeurance of '[/text]' when reading/writing large newlisp code as text...??
Or do you have another hint?
Im unable to get this working.. There seems to be no quoting for for this in normal text files...
Lutz, perhpas the parser function should always seek for the "last" occeurance of '[/text]' when reading/writing large newlisp code as text...??
Or do you have another hint?
-- (define? (Cornflakes))
'base64-enc'-ode bigger text portions of unknown content first, then bracket them with [text],[/text] tags, e.g:
Any other solution can lead to ambiguities.
Code: Select all
[text]dGhpcyBoYXMgW3RleHRdZW1iZWRkZWRbL3RleHRdIHRhZ3M=[/text]