…hecks
The tutorial says the example "verifies that it has a link to the
owner", and explains the HTML mode with "we want text from a link".
Both code examples only return `'iana' in web_data`, a case-sensitive
substring test on the returned HTML. It matches `iana` in visible text
or in an attribute value, and it never looks for an `<a>` element or at
its `href`.
Describe what the example does and where it stops, and leave both code
examples unchanged. A parser-based example that really verifies an
owner link would be a separate change.
Fixes genlayerlabs#802
Summary
Fixes #802. The "Your First Intelligent Contract" tutorial says the example verifies that the page has a link to the owner, but both code examples only return
'iana' in web_data. This PR makes the prose describe what the code does. The code examples are unchanged.Change
first-intelligent-contract.mdx, two lines:ianaappears anywhere in the HTML, and that it neither looks for a link nor checks where a link points or who owns the page'iana' in web_datais a plain case-sensitive substring test matching anywhere in the returned HTML (visible text, an attribute value such as anhref), and that it does not parse<a>elements or validatehrefvaluesThe wording follows the replacement text proposed in the issue (thanks to its author for the precise report), with one deliberate difference: I did not write that the check can match HTML comments. The issue itself notes that GenVM's rendering semantics were not tested, and the SDK docs for
web.render(mode='html')do not say what the returned HTML contains, so I kept to what follows from the code:inon the returned string.Checked
I evaluated the predicate on literal strings before writing each claim: it returns
Truefor body text only, for a link to another site whosehrefmerely containsiana, and for a plain attribute value with no<a>at all; it returnsFalseforIANAin uppercase on its own (so "case-sensitive" and "lowercase" are accurate). The same wording appears nowhere else inpages/. The MDX compiles with@mdx-js/mdx. I did not run the contract against GenVM or Studio.Summary by CodeRabbit