turnermm / TextInsert

A macro utility for Dokuwki
http://www.dokuwiki.org/plugin:textinsert
8 stars 4 forks source link

Textinsert with comma #3

Closed Juergen-aus-Zuendorf closed 11 years ago

Juergen-aus-Zuendorf commented 11 years ago

Hi,

is there a possibility to use the comma inside a parameter for the expanded functionality of the textinsert plugin? Example:

@MSG_ACHTUNG_HTML~Vorsicht, Gefahr fehlerhafter Datenverarbeitung~@

The text "Vorsicht, Gefahr fehlerhafter Datenverarbeitung" should be transformed only to one parameter "%1"

Regards Juergen

turnermm commented 11 years ago

You can use the comma entity: ,

Macro definition:
comma_test: use a comma here %1 and here %2

Wiki markup:

@comma_test~abc,tested,def,ghi~@

Result: use a comma here abc,tested and here def,ghi

Juergen-aus-Zuendorf commented 5 years ago

Hi,

i've modified your macro a little bit so that the comma is substituted by "||" and multiline functionality is supported. For this I have defined a new type "MULTI" besides the existing parameters.

Here is the new file: syntax.zip

Syntax example:

#@CMS_GEFAHR_MULTI~
|Gefahr       |
|Überschrift  |
|+zweizeilig  |
|Hinweistext  |
~@#

Because I have no experience in GitHub: Perhaps is it possible that you could take it over as a new release?

Best regards Juergen