hbstack / hb

The core module of HB framework, which automatically load and compile module's TypeScript and SCSS.
https://hbstack.dev/
MIT License
18 stars 3 forks source link

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

Closed TetraTheta closed 2 months ago

TetraTheta commented 2 months ago

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.

razonyang commented 2 months ago

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

TetraTheta commented 2 months ago

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

razonyang commented 2 months ago

Thanks.