Syntax highlighting of 270c858 ~( moin)
= contributing to moin - a shy developer story = == getting set up == === weechat and screen === [[https://www.linode.com/docs/guides/using-weechat-for-irc/|linode weechat doc]] [[https://libera.chat/|libera IRC chat server home page]] === github === setup: fork, set up github auth & clone development process: branch, code, test, commit, push, create pull request == diving into the code == === understanding moin.utils.tree === [[WikiPedia:QName]] [[https://developer.mozilla.org/en-US/docs/Web/SVG/Namespaces_Crash_Course|svg namespace crash course]] {{{#!highlight python from moin.converters._tests import serialize from emeraldtree import ElementTree as ET from moin.utils.tree import moin_page, html, dc, mathml, svg, xinclude, xlink, docbook, xml def dump(el): namespaces = { moin_page : 'moin_page', html: 'xhtml', dc : 'dc', mathml: 'mathml', svg: 'svg', xinclude: 'xinclude', xlink: 'xlink', docbook: 'docbook', xml: 'xml', } print(f'{serialize(el, namespaces=namespaces)}') html.p == ET.QName('p', 'http://www.w3.org/1999/xhtml') n = html.p n.name n.uri el1 = ET.Element(html.p) el2 = html.p() el1 == el2 el1.tag == el2.tag elp = html.p() elp.append('hello world ') elp.text dump(elp) ela = html.a() ela.set(html.href, 'page.html') dump(ela) elp.append(ela) elp.append(' more text') dump(elp) }}}
