Jump to content

Ayuda:Errores de lint/missing-end-tag

From mediawiki.org
This page is a translated version of the page Help:Lint errors/missing-end-tag and the translation is 100% complete.

El error de etiqueta de cierre faltante (missing-end-tag) se produce cuando una ‎<etiqueta> se abre, pero no se cierra. Para corregirlo, cierra la etiqueta de apertura.

Ejemplos

Ejemplo 1:

<span> rabbits

En el ejemplo 1, hay que cerrar el span añadiendo ‎</span> al final.

<span> rabbits</span>

Ejemplo 2:

<span>Foo

baz
</span>

Note that this example may be potentially confusing since there is both an open and closing span tag. But, note that this is wikitext, not HTML. As such, when this wikitext is processed, the first line gets wrapped in a p-tag, and the 3rd and 4th lines get wrapped in a second p-tag. So, the "opening" and "closing" span tags are split between two paragraph tags. So, in the first paragraph, the span tag is indeed unclosed!

Ejemplo 3:

<span>foo
<p>bar</p>
boo
</span>

As with example 2, this is also wikitext, not HTML. So, the first line gets wrapped in a p-tag within which the span tag is unclosed.

Los ejemplos 2 y 3 no solo provocan el aviso del linter de etiqueta de cierre faltante sino también el de etiqueta desparejada. La solución para los ejemplos 2 y 3 dependen de la salida exacta que se espera. La más sencilla consiste en cambiar el ‎<span> por un ‎<div>.

El mensaje confuso es el resultado de que el analizador sintáctico genere automáticamete etiquetas ‎<p>...‎</p> para cada párrafo de texto.

Ejemplo 4:

''rabbits

En el ejemplo 4, la etiqueta HTML es el resultado de analizar la sintaxis de wikitexto para el texto en cursiva. Hay que cerrar la marca de cursiva añadiendo '' al final.

Example 5:

'ת''א, פינת מנצ'סטר: סיפורו

Newspaper article titles in Hebrew sometimes use two apostrophes as markup. Replace them with &apos;&apos;

Herramientas

Las siguientes herramientas pueden ayudar a corregir las etiquetas de cierre faltantes: