Skip to content

fix: allow specifying id attribute for blockquotes and tables#247

Merged
razonyang merged 3 commits intohbstack:mainfrom
TetraTheta:attr
Sep 10, 2024
Merged

fix: allow specifying id attribute for blockquotes and tables#247
razonyang merged 3 commits intohbstack:mainfrom
TetraTheta:attr

Conversation

@TetraTheta
Copy link
Contributor

I added missing id attribute.

Test markdown:

> p
{#asdf .sec}

| | |
|-|-|
|test|test2|
{.cls #tbl _thead=false}

Rendered result:

<blockquote id="asdf" class="blockquote sec border-start ps-3 py-1 border-primary border-4">
  <p>p</p>
</blockquote>
<div class="table-responsive">
  <table id="tbl" class="table table-bordered align-middle table-hover table-striped cls">
    <tbody>
      <tr>
        <td class="text-start">test</td>
        <td class="text-start">test2</td>
      </tr>
    </tbody>
  </table>
</div>

I only tested with #id syntax, but this should also work with id= syntax.

@TetraTheta TetraTheta changed the title Allow ID attribute in blockquote and table block fix: allow specifying id attribute for blockquotes and tables Sep 10, 2024
@razonyang
Copy link
Member

The table should already support id, could you please confirm it and revert the change of table hook.

Original code already handled the ID attribute correctly
@TetraTheta
Copy link
Contributor Author

I removed the table hook from the PR. Thank you for letting me know about that!

@razonyang razonyang merged commit 29fd6b1 into hbstack:main Sep 10, 2024
@razonyang
Copy link
Member

Thanks.

@TetraTheta TetraTheta deleted the attr branch September 10, 2024 11:21
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