Skip to content

fix #8041: templates inside v-pre should be rendered to HTML #8146

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Oct 24, 2018

Conversation

kball
Copy link
Contributor

@kball kball commented May 8, 2018

close #8041

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

I don't believe this is breaking as content inside of v-pre is considered to be static. However it does change the outputted static content in the case where a <template> tag is labeled with v-pre or inside of a v-pre element.

The PR fulfills these requirements:

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:

I pushed a 'compiled' version of this to a different branch to show the working behavior on jsFiddle. The original fiddle from issue #8041: https://jsfiddle.net/zct418xa/1/
A fiddle with the updated behavior using vue.js compiled from this change: https://jsfiddle.net/f7nv9218/

@kball
Copy link
Contributor Author

kball commented May 14, 2018

Any feedback on this PR? No pressure as I know how hard it is as a maintainer - I'm just excited to learn more about the Vue codebase and tackling issues is the best way I know to do that.

Will happily take feedback on approach, style, or anything else.

@zippaaa
Copy link

zippaaa commented Oct 12, 2018

It is strange that they do not approve this changes.

Component

<template>
    <div>
        <template v-pre> <---- It's my template
            bla-bla            I need it later.
        </template>            But vue break it.

        <ul>
           <li>Hello
        </ul>
    </div>
</template>

@yyx990803 yyx990803 merged commit ecac831 into vuejs:dev Oct 24, 2018
@michael-hawker
Copy link

@kball @yyx990803 has this regressed?

If I create a new fiddle it still repros. Or is this change not in 2.6.10? I'm encountering this issue as posted here, so I want to know how I can get a version with this fix.

Thanks!

@cutPicturesMan
Copy link

@alekseymvt @michael-hawker see this issue: #10717

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v-pre do not work in template tags
6 participants