[Pmwiki-users] RE: Pmwiki-users Digest, Vol 1, Issue 177

W.L.Alsemgeest W.L.Alsemgeest
Thu Jul 17 02:21:00 CDT 2003


Message: 1

Several people have remarked on this listserv and in other communications
about the meaning of line breaks in markup text, as well as the ugly
[[<<]] markup for adding line breaks in the output.

I have a few ideas on this topic that I want to present to the group for
discussion.  Note that at the moment I'm doing this only for
brainstorming/discussion purposes--I'm not necessarily intending to
change anything along these lines.  I just want to solicit opinions
from the group and gauge interest.

Currently, PmWiki combines consecutive lines of text that don't have
leading markup into a single paragraph.  Thus, if someone enters markup
text as

    Knowing others is intelligence;
    knowing yourself is true wisdom.
    Mastering others is strength;
    mastering yourself is true power.

then PmWiki currently renders this as

    Knowing others is intelligence; knowing yourself is true
    wisdom. Mastering others is strength; mastering yourself
    is true power.

The reason that PmWiki works this way is largely historical--I was
trying to keep PmWiki similar to other wiki engines and this is how
they worked.  But over time I've been refining the principle that
the output text ought to look something like the markup source, and
clearly that is not what happens here.  In PmWiki's current implementation,
if someone wants the phrases above to appear on separate lines they must
enter something like

    Knowing others is intelligence;
    [[<<]]knowing yourself is true wisdom.
    [[<<]]Mastering others is strength;
    [[<<]]mastering yourself is true power.

which I think everyone agrees looks pretty awful.

So, one idea that I've been playing with is the notion that newlines
occurring between two text lines could be treated as line breaks in the
output.  Blank lines would still be used to create paragraph breaks, as
before, newlines would still mark the end of list items, and newlines
could be still escaped using \ at the end of a line.  Thus markup of

    one
    two

    three
    four

would display that way on output.

Another idea is to introduce a new markup, say [/.../], that has the
sole purpose of grouping multiple lines together into a single line
for block-level formatting purposes but continuing to honor embedded
markup.  For example, the markup text

    # This is item 1
    # [/This is item #2 with
    item text that
    contain line breaks, italics, bold, links,

    and paragraph breaks and still be
    within the same item./]
    # This is item 3

could then render as

    1. This is item 1
    2. This is item #2 with
       item text that
       contain line breaks, italics, bold, links,

       and paragraph breaks and still be
       within the same item.
    3. This is item 3

Or, we could take a completely opposite approach, and use a markup such
as [/.../] to mean ignore intervening newlines entirely, as in

    one
    two

    three

    [/four
    five

    six/]

which would render as

    one
    two

    three

    four five six


Or, we could look at other combinations.

I'm very interested to hear opinions on:
  - does any of this make sense?
  - would it pose any real problems for existing installations?
  - is it too radical a change?
  - are there other considerations I haven't thought about?


I think it is best to keep as much as posible to a standard way of writing
pmwiki.
Just one [ followed by a / '[/' looks nice but why not [[/ and end the pre
formatted text with /]]
So,

# This is line one
# [[/ Tis is line two
and this is still
line two /]]
# Tis is line three

looks like
1 This is line one
2 Tis is line two
  and this is still
  line two
3 Tis is line three

Greetings,
Wim Alsemgeest






More information about the pmwiki-users mailing list