Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternative short-hand syntax #226

Open
GJRobert opened this issue Oct 29, 2020 · 0 comments
Open

Alternative short-hand syntax #226

GJRobert opened this issue Oct 29, 2020 · 0 comments

Comments

@GJRobert
Copy link

Hi, wrap plugin is really an intensely used one, because its versatile ability of creating nearly every kind of inline/block elements.

Before using DokuWiki, I have long been using TiddlyWiki Classic which comes with span/div syntax too:

{{customClassName{Some random text}}} ← <span>

{{customClassName{
 Some random text
}}}
↑<div>

The syntax was simple: almost the same {{xx{YYY}}} for both spans and divs, and adding a linefeed in it makes them become divs.

I've always wonder if we can have similar syntaxes for wrap plugin for years. Of course {{...}} is not available since it's for DokuWiki media files; and of course we don't have to use one syntax to rule them both.

Will it be possible to make something like below?

{[class #id width[ for spans ]}

{[class #id width[{ for divs }]}

I just tried to hack in the current wrap plugin file, with which I can yield a span, but CSS class and other attributes not yet effective:
GJRobert@a81e284

I definitely lack enough knowledge of regex, which is the reason I'm stuck. Can you provide a hint to make it work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant