From aa9b567fb8e9b4904dbf103e6f46ea356a912a9c Mon Sep 17 00:00:00 2001 From: Phan An Date: Mon, 18 Feb 2019 07:52:44 +0100 Subject: [PATCH] More fixes for %raw% tags showing --- src/v2/guide/migration-vue-router.md | 4 +-- src/v2/guide/migration.md | 46 ++++++++++++++-------------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/v2/guide/migration-vue-router.md b/src/v2/guide/migration-vue-router.md index f107c95538..8b4a12c582 100644 --- a/src/v2/guide/migration-vue-router.md +++ b/src/v2/guide/migration-vue-router.md @@ -211,9 +211,9 @@ to a definition like below in your `routes` configuration: If you need multiple aliases, you can also use an array syntax: -``` js +{% codeblock lang:js %} alias: ['/manage', '/administer', '/administrate'] -``` +{% endcodeblock %} {% raw %}
diff --git a/src/v2/guide/migration.md b/src/v2/guide/migration.md index b9a8a9a83e..a82414dc4e 100644 --- a/src/v2/guide/migration.md +++ b/src/v2/guide/migration.md @@ -210,15 +210,15 @@ The implicitly assigned `$index` and `$key` variables have been removed in favor `track-by` has been replaced with `key`, which works like any other attribute: without the `v-bind:` or `:` prefix, it is treated as a literal string. In most cases, you'd want to use a dynamic binding which expects a full expression instead of a key. For example, in place of: -``` html +{% codeblock lang:html %}
-``` +{% endcodeblock %} You would now write: -``` html +{% codeblock lang:html %}
-``` +{% endcodeblock %} {% raw %}
@@ -400,9 +400,9 @@ For enumerated attributes, in addition to the falsy values above, the string `"f When used on a component, `v-on` now only listens to custom events `$emit`ted by that component. To listen for a native DOM event on the root element, you can use the `.native` modifier. For example: -``` html +{% codeblock lang:html %} -``` +{% endcodeblock %} {% raw %}
@@ -602,9 +602,9 @@ As you can see, `v-model`'s two-way binding doesn't make sense here. Setting `st Instead, you should use an array of __objects__ so that `v-model` can update the field on the object. For example: -``` html +{% codeblock lang:html %} -``` +{% endcodeblock %} {% raw %}
@@ -709,7 +709,7 @@ The `.literal` modifier has been removed, as the same can be easily achieved by For example, you can update: -``` js +``` html

``` @@ -990,9 +990,9 @@ computed: { You can even order by multiple columns: -``` js +{% codeblock lang:js %} _.orderBy(this.users, ['name', 'last_login'], ['asc', 'desc']) -``` +{% endcodeblock %} {% raw %}
@@ -1070,9 +1070,9 @@ function pluralizeKnife (count) { For a very naive implementation, you could do something like this: -``` js +{% codeblock lang:js %} '$' + price.toFixed(2) -``` +{% endcodeblock %} In many cases though, you'll still run into strange behavior (e.g. `0.035.toFixed(2)` rounds up to `0.04`, but `0.045` rounds down to `0.04`). To work around these issues, you can use the [`accounting`](http://openexchangerates.github.io/accounting.js/) library to more reliably format currencies. @@ -1365,9 +1365,9 @@ Instead, retrieve reactive data directly. Use the native DOM API: -``` js +{% codeblock lang:js %} myElement.appendChild(vm.$el) -``` +{% endcodeblock %} {% raw %}
@@ -1380,9 +1380,9 @@ myElement.appendChild(vm.$el) Use the native DOM API: -``` js +{% codeblock lang:js %} myElement.parentNode.insertBefore(vm.$el, myElement) -``` +{% endcodeblock %} {% raw %}
@@ -1395,15 +1395,15 @@ myElement.parentNode.insertBefore(vm.$el, myElement) Use the native DOM API: -``` js +{% codeblock lang:js %} myElement.parentNode.insertBefore(vm.$el, myElement.nextSibling) -``` +{% endcodeblock %} Or if `myElement` is the last child: -``` js +{% codeblock lang:js %} myElement.parentNode.appendChild(vm.$el) -``` +{% endcodeblock %} {% raw %}
@@ -1416,9 +1416,9 @@ myElement.parentNode.appendChild(vm.$el) Use the native DOM API: -``` js +{% codeblock lang:js %} vm.$el.remove() -``` +{% endcodeblock %} {% raw %}