Skip to content

Conversation

pydanny
Copy link
Contributor

@pydanny pydanny commented Jul 17, 2024

The cls argument is now moved to the end of the result of the html2xt function. So this:

<form>
  <fieldset>
    <input id="title" class="char" name="title" value="Profit"></input>
    <label>
      <input type="checkbox" data-foo="bar" id="done" class="checkboxer" name="done" checked="1"></input>
Done
    </label>
    <input type="hidden" id="id" name="id" value="2"></input>
    <textarea id="details" name="details">Details</textarea>
    <button>Save</button>
  </fieldset>
</form>

becomes this:

python
Form(
    Fieldset(
        Input(id='title', name='title', value='Profit', cls='char'),
        Label(
            Input(type='checkbox', data_foo='bar', id='done', name='done', checked='1', cls='checkboxer'),
            'Done'
        ),
        Input(type='hidden', id='id', name='id', value='2'),
        Textarea('Details', id='details', name='details'),
        Button('Save')
    )
)

@pydanny pydanny force-pushed the html2xt-move-class-to-end branch from cc63349 to 6ca4ee7 Compare July 17, 2024 10:01
@jph00 jph00 merged commit c41a6d7 into main Jul 17, 2024
@pydanny pydanny deleted the html2xt-move-class-to-end branch July 19, 2024 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants