Previous Entry Share Next Entry
Release 0.8.3
jducoeur wrote in querki_project
Today's release is focused on a few QText enhancements, mostly related to the handling of HTML tags.

HTML-only lines are now emitted with little processing: one of the constant headaches has proven to using <div>s in QText. It is necessary if you are doing fancy layout stuff, but the way that things automatically get turned into paragraphs gets in the way. (Especially the fact that paragraphs are emitted as <div class="para">, so the close tag of the paragraph keep accidentally closing your div.)

To make this easier to work with, I'm put in a special case that, if a line contains *nothing* but HTML tags and whitespace, it is emitted more or less unchanged. That means that common cases line:
<div class="myOuterClass>
  <div class="myInnerClass">
    Here's my actual content!
now work pretty much as expected -- the div's go through unchanged.

One current detail: if an HTML-only line contains whitespace *between* the tags, that intervening whitespace will get stripped. Yell if that proves to be a problem. Leading whitespace -- indentation -- is deliberately preserved, to make the resulting HTML page a little easier to read.

Added the !+noLines flag: the above fix help if you can easily put your tags on separate lines from content, but that's not always possible. So I've also added a !+noLines/!-noLines flag, which turns off both paragraph *and* break emitting while it is turned on. This is similar to !+rawLines, which I added some time ago (and which I use heavily in my Songbook Space), which turns newlines into <br> tags instead of wrapping everything in paragraphs. !+noLines is similar but stronger, leaving out both the paragraph wrapping *and* any breaks.

This is really intended only for power users who are doing serious mucking with div's, usually for formatting reasons. (Which at the moment mostly means mindways, who continues to push the look-and-feel capabilities way beyond anything I'm doing.) But it should be helpful when you're in that situation.

Whitelisted the table tags: the primary tags for tables -- <table>, <tr>, <th> and <td> -- have now been whitelisted, as have the colspan and rowspan attributes. They aren't the primary recommended way of doing layout (using Bootstrap's classes produces much more responsive results on small screens), but they're still sometimes helpful for really getting the layout just the way you want it.

Disabled Link Definition: Markdown has an alternate syntax for URLs that is sort of footnote-like, called "reference links" -- it lets you reference the URL in a link in one place, and define the actual URL itself somewhere else. It makes sense for Markdown, but has never fit Querki especially well, and it *massively* complicates the parser. (And I don't think anyone has used it.) So I've disabled it for now, and will probably remove it altogether down the road. I suspect that, if we ever find ourselves wanting something like this, there will be more Querkish ways to deal with it. (Note that I will shortly be adding a proper External Link datatype, which lets you specify both the URL and the display text.)


Log in

No account? Create an account