Skip to content

Instantly share code, notes, and snippets.

@rgchris
Last active August 29, 2015 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rgchris/50645946bc31ab57a090 to your computer and use it in GitHub Desktop.
Save rgchris/50645946bc31ab57a090 to your computer and use it in GitHub Desktop.
Power Mezz failure on Ren/C
#!/usr/local/bin/ren-c
Rebol [
Title: "Power Mezz Test"
Date: 7-Jul-2015
Author: "Christopher Ross-Gill"
]
extend lib 'envelop envelop: func [value][compose [(value)]]
extend lib 'neaten-deep neaten-deep: func [
block [block!]
/local attribute element mark
][
attribute: [[word! | path!] skip]
element: [
mark: (new-line/all mark false new-line mark true)
'declaration skip into ['value string!]
| 'text skip into [mark: (new-line mark true) 'value string!]
| 'comment skip [into [mark: (new-line mark true) to end] | skip]
| [word! | path!]
block!
opt into [
mark: (new-line/all/skip mark true 2)
any attribute
]
mark: (new-line/all mark true)
any [into [element]]
end
]
parse block [
mark: (new-line mark true)
'root skip skip some [into [element]]
]
block
]
append system/options/module-paths clean-path %./
import %mezz/load-html.r
probe 'script.load-html
probe neaten-deep load-html "<html><head><title>This Title Here</title>"
probe /script.load-html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment