Shorter code for empty div #59

wants to merge 21 commits into


None yet

3 participants

ssahara commented Feb 10, 2014

Hi, Anika.
This request concerns issue #9, and I also agree that it would be nice if there could be a shorter code for clear floats. The syntax component "clearfloat.php" will provide match pattern <WRAP clear/> , <block clear /> and <div clear />, of which last one looks strange for me.


Sorry for the very late reply.

<WRAP clear/> was just an example. This kind of shorthand should work for all kinds of classes, not just "clear". There are currently only two such classes ("clear" and "pagebreak") built into the Wrap plugin, but as the plugin can be enhanced with custom styles, it makes sense to keep that as flexible as possible.

So, any <WRAP|div|block [classname] /> should render as <div class="[...] wrap_[classname]"></div>.

ssahara commented May 11, 2015

Thanks for your reply and clarification of the shorthand syntax.
Additionally, I think that both block and inline wrap should support shorthand syntax. This means any <wrap | span |inline [#id] [classname] /> should be rendered as <span id="id" class="[...] wrap_[classname]"></span>.
Usually I write Japanese page, and sometimes want to put anchor (in English) independent from the Japanese context. The id attribute is available as a link anchor instead of name attribute in HTML5.


Thanks, this is generally looking good. I will properly look at it and test it on the weekend.


This doesn't seem to work. When I use the following syntax:

<div left box 200px>
float left

<div clear />
followed by a clear?

The "float left" box doesn't appear, I see only the text "followed by a clear?".

Your commit history is weird, e.g. several commits are in there twice. Could you please clean that up and also merge my master into your branch? (Sorry, I just merged something bigger which creates a merge conflict.)

@selfthinker selfthinker removed the ready label May 24, 2015
ssahara commented May 25, 2015

Sorry, my request was NOT work fine. The special pattern need to be fixed '<div\b[^>\r\n]*?/>';.
And sorry again for weird commit history, which is caused by a rebase of git command.
Anyway I will make a different PR later.
Edit: new PR #105 sent now.


Closing in favour of #105.

@ssahara ssahara deleted the ssahara:ClearFloats branch Jul 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment