Skip to content
This repository was archived by the owner on Nov 26, 2025. It is now read-only.

wrap examples#54

Draft
Aratramba wants to merge 1 commit intomasterfrom
feature/wrap
Draft

wrap examples#54
Aratramba wants to merge 1 commit intomasterfrom
feature/wrap

Conversation

@Aratramba
Copy link
Copy Markdown
Owner

@Aratramba Aratramba commented May 11, 2020

add the ability to wrap pug code around examples, for each example separately and globally:

//- @pugdoc
  name: Foo
  wrap: |
    div.wrap
  examples:
    - | span 1
    - | span 2

should output:

<div class="wrap"><span>1</span><span>2</span></div>

Question: What should the wrap option do for individual examples? Ignore? Or also wrap?
(Maybe a solution for the grouped-example could be to add a separator option?)


//- @pugdoc
  name: Foo
  wrapEach: |
    div.wrap
  examples:
    - | span 1
    - | span 2

should output:

<div class="wrap"><span>1</span></div><div class="wrap"><span>2</span></div>

@Aratramba Aratramba self-assigned this May 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant