OasisDigital / ng-doc-portal

An Nx plugin & Angular module set that allows you to build documentation applications natively in Angular! This project has a focus on documenting Angular components (e.g. component library), but it can be used for any documentation needs you might have in Angular.
3 stars 0 forks source link

ngdpCodeSnippet not working for css or scss language settings #17

Open Bill77 opened 1 month ago

Bill77 commented 1 month ago

It seems the ngdpCodeSnippet directive is not working for non-Angular/typescript settings, I just tried for css, and it doesn't seem to be working.

Here is what I have in my template:

<textarea ngdpCodeSnippet lang="scss">
    .header-style {
      display: flex;
      align-items: center;
      ecl-icon {
        height: 0.875rem;
        width: 0.875rem;
        margin-right: 0.5rem;
      }
    }
</textarea>

<!-- Trying the other way -->
<ngdp-code-snippet lang="scss">
  <textarea>
      .header-style {
        display: flex;
        align-items: center;
        ecl-icon {
          height: 0.875rem;
          width: 0.875rem;
          margin-right: 0.5rem;
        }
      }
  </textarea>
</ngdp-code-snippet>

Here is what I see.

image

Also here is what I see via DevTools - looks like the lang to languages isn't being propagated? image

Apologies, if this was user error? 😄

zjkipping commented 1 month ago

Hey Bill, apologies for the late response. As far as I can tell from a quick glance we are supporting everything that hljs supports. I'll triage this issue, but we are a little short staffed for working on our open source packages currently. Will see if we can get this worked on though.