[squeak-dev] The Inbox: Collections-eem.732.mcz -- HtmlReadWriter

Eliot Miranda eliot.miranda at gmail.com
Thu Feb 9 19:13:21 UTC 2017


Hi Tobias,

On Thu, Feb 9, 2017 at 10:54 AM, Tobias Pape <Das.Linux at gmx.de> wrote:

> Hi all,
>
> On 09.02.2017, at 09:47, H. Hirzel <hannes.hirzel at gmail.com> wrote:
>
> > On 2/8/17, Tobias Pape <Das.Linux at gmx.de> wrote:
> >>
> >> On 08.02.2017, at 19:59, Eliot Miranda <eliot.miranda at gmail.com> wrote:
> >>
> >>> Hi All,
> >>>
> >>>    I'd really like this to be in trunk.  I've just written a blog post
> in
> >>> a Workspace using this code
> >>> (http://www.mirandabanda.org/cogblog/2017/02/07/smalltalk-
> scanning-and-shcontrol-structures/)
> >>> and it turns creating a blog post into a simple copyHtml paste
> operation
> >>> from a workspace to (in my case) WordPress.  So any reviewers?
> >>
> >> Care to explain it a litte bit? :)
> >> It looks a bit complicated to my eyes.
> >> Also, do you really want <pre>?
> >> (http://stackoverflow.com/questions/4611591/code-vs-pre-
> vs-samp-for-inline-and-block-code-snippets#4611735)
> >>
> >> The HtmlReadWriter seems to (up until now) pretty directly map text
> >> attributes to html attributes.
> >>
> >> You seem to want to differentiate code from non-code, so what about
> having a
> >> do-it attribute, that does exactly that?
> >> Because now, there's also no back-reading of such html into a Text
> object,
> >> wich I find unfortunate.
> >> I think, the readwriter should be able to read what it has written.
> >>
> >> I know, it's a mere convenience thing, but still, its very procedural,
> and
> >> seeing #~~ in high-level code is strange to my eyes…
> >>
> >> What would be really cool is to
> >>      - mark the code as do-it
> >>      - have the do-it present itself as <code> or <pre> on Html.
> > +1
>
> So with Bert's help, I did just that (see trunk).
>
> Workflow for Eliot could be now:
>  - Write text in workspace
>  - Copy (formatted) code to workspace
>  - [Attention: new] select the code and CMD-6 it as DoIt
>    (code is now clickable and underlined)
>  - repeat until satisfied
>  - yellow-click and 'copy as html'
>

Thanks for your efforts, but, forgive me for saying so, this is worse than
my approach.  <pre> is designed to preserve wits-space, and indented text
needs this.  If there's a bug with my code it is that it looks for tab at
start-of-like rather than whitespace.  Can we merge our code?  IMO your
approach should cause text marked as a Doit to be generated between
<code></code> markers, where as there is still a need for generating
non-Doit code between <pre></pre> markers.  If you don't object I'll merge
in my code.


>
> Also, there are two test for this behavior now.
>
> HTH
>
> Best regards
>         -Tobias
>
>
>
>


-- 
_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20170209/9c5cb044/attachment.html>


More information about the Squeak-dev mailing list