Skip to content
This repository was archived by the owner on Aug 14, 2019. It is now read-only.

Conversation

@jfranklin9000
Copy link
Contributor

This patch implements ![alt-text](image-url) markdown to udon.
The alt-text is displayed if image-url doesn't exist.

One small issue is ![](image-url) produces an alt="" tag.
This is fine if image-url exists, but ![](non-existant-url)
shows the broken image icon in Firefox (desired), while Chrome
shows nothing (arguably correct). I'd like to see the broken
image icon and will look into not adding the alt tag in this
case.

Another issue concerns ![alt-text](image-url "title-text").
This affects link markdown too: [some-content](link-url "title-text").
https://urbit.org/docs/learn/arvo/arvo-internals/udon/ does
not mention title text markdown so it doesn't exist in udon.
However, the parser will consume it and produce
<a href="link-url &quot;title-text&quot;">some-content</a>
instead of using a title tag. I will look into proper title text
handling for links and images.

I don't think either of these issues should prevent a pull.

@jfranklin9000
Copy link
Contributor Author

The first issue can be fixed by replacing

            $mage  [[%img [%src q.nex] [%alt p.nex] ~] ~]~

with

            $mage  [[%img [%src q.nex] ?~(p.nex ~ [%alt p.nex]~)] ~]~

I'll commit, squash and push later today.

@jfranklin9000
Copy link
Contributor Author

I've pushed the no-alt-text fix.

@rmariani
Copy link

This is great! Having to use Sail for images in otherwise-Udon files was annoying.

Copy link

@belisarius222 belisarius222 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rmariani rmariani changed the base branch from master to next March 2, 2019 02:40
@rmariani rmariani merged commit 34c69c3 into urbit:next Mar 2, 2019
@ixv ixv mentioned this pull request Mar 7, 2019
joemfb added a commit that referenced this pull request Mar 13, 2019
* master: (38 commits)
  bumped ames protocol number
  landscape 3f83c798bd61b7e6cef5c4e2f7c7f3ac89d4ec09
  removed hard calls on json blobs
  Support eth_getBlockByNumber Ethereum RPC call
  added initial image support to udon parser (#1085)
  Tiebout - Apple Push Notification Server App (#1084)
  Implement +from-unix for turning timestamps into @da
  Add support to `lens-command` for pill output and optimized base64 encoding. (#1068)
  Point to the correct topics when decoding Azimuth events
  Add trailing newlines
  Use unit to disambiguate poll timer state
  Lightly re-order ++watcher core, add comments
  Implement ++peek so the app can by scried
  Remove debug pokes
  Implement %eth-watcher, an app for tracking Ethereum events
  add control flow to |verb
  Be accurate in incoming/hoon-side structures also
  More accurately represent Ethereum RPC filter topics
  also pin validate-x to now
  pin to local time because using local desk
  ...
BernardoDeLaPlaz pushed a commit to BernardoDeLaPlaz/arvo that referenced this pull request Mar 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants