Use "*:placeholder" as placeholder label (#27520)

GitOrigin-RevId: eb6566e8cab401675df21a54d0b1035fd6e8a8df
This commit is contained in:
Alf Eaton
2025-07-31 14:05:21 +01:00
committed by Copybot
parent 94c8fe5b93
commit 677ebf3590
4 changed files with 11 additions and 11 deletions

View File

@@ -155,7 +155,7 @@ const FigureModalContent = () => {
dispatch({ error: String(error) })
return
}
const labelCommand = includeLabel ? '\\label{fig:enter-label}' : ''
const labelCommand = includeLabel ? '\\label{fig:placeholder}' : ''
const captionCommand = includeCaption ? '\\caption{Enter Caption}' : ''
if (figure) {
@@ -228,7 +228,7 @@ const FigureModalContent = () => {
const widthArgument =
width !== undefined ? `[width=${width}\\linewidth]` : ''
const caption = includeCaption ? `\n\t\\caption{\${Enter Caption}}` : ''
const label = includeLabel ? `\n\t\\label{\${fig:enter-label}}` : ''
const label = includeLabel ? `\n\t\\label{\${fig:placeholder}}` : ''
snippet(
`\\begin{figure}

View File

@@ -86,7 +86,7 @@ ${(
'\\\\\n'
).repeat(sizeY)}\t\\end{tabular}
\t\\caption{Caption}
\t\\label{tab:my_label}
\t\\label{tab:placeholder}
\\end{table}${suffix}`
snippet(template)({ state, dispatch }, { label: 'Table' }, pos, pos)
return true

View File

@@ -39,7 +39,7 @@ export const environments = new Map([
\t\\centering
\t\\includegraphics[width=0.5\\linewidth]{$1}
\t\\caption{\${2:Caption}}
\t\\label{\${3:fig:enter-label}}
\t\\label{\${3:fig:placeholder}}
\\end{figure}`,
],
[
@@ -69,7 +69,7 @@ export const environments = new Map([
\t\t$5 & $6
\t\\end{tabular}
\t\\caption{\${7:Caption}}
\t\\label{\${8:tab:my_label}}
\t\\label{\${8:tab:placeholder}}
\\end{table}`,
],
[

View File

@@ -130,7 +130,7 @@ describe('<FigureModal />', function () {
// icon, which is literal text in the document
cy.get('.cm-content').should(
'have.text',
'\\begin{figure} \\centeringedit \\caption{Enter Caption} 🏷fig:enter-label\\end{figure}'
'\\begin{figure} \\centeringedit \\caption{Enter Caption} 🏷fig:placeholder\\end{figure}'
)
})
@@ -179,7 +179,7 @@ describe('<FigureModal />', function () {
// icon, which is literal text in the document
cy.get('.cm-content').should(
'have.text',
'\\begin{figure} \\centeringedit \\caption{Enter Caption} 🏷fig:enter-label\\end{figure}'
'\\begin{figure} \\centeringedit \\caption{Enter Caption} 🏷fig:placeholder\\end{figure}'
)
})
})
@@ -267,7 +267,7 @@ describe('<FigureModal />', function () {
// icon, which is literal text in the document
cy.get('.cm-content').should(
'have.text',
'\\begin{figure} \\centeringedit \\caption{Enter Caption} 🏷fig:enter-label\\end{figure}'
'\\begin{figure} \\centeringedit \\caption{Enter Caption} 🏷fig:placeholder\\end{figure}'
)
})
@@ -296,7 +296,7 @@ describe('<FigureModal />', function () {
// icon, which is literal text in the document
cy.get('.cm-content').should(
'have.text',
'\\begin{figure} \\centeringedit \\caption{Enter Caption} 🏷fig:enter-label\\end{figure}'
'\\begin{figure} \\centeringedit \\caption{Enter Caption} 🏷fig:placeholder\\end{figure}'
)
})
})
@@ -442,7 +442,7 @@ describe('<FigureModal />', function () {
// icon, which is literal text in the document
cy.get('.cm-content').should(
'have.text',
'\\begin{figure} \\centeringedit \\caption{Enter Caption} 🏷fig:enter-label\\end{figure}'
'\\begin{figure} \\centeringedit \\caption{Enter Caption} 🏷fig:placeholder\\end{figure}'
)
})
@@ -471,7 +471,7 @@ describe('<FigureModal />', function () {
// icon, which is literal text in the document
cy.get('.cm-content').should(
'have.text',
'\\begin{figure} \\centeringedit \\caption{My caption} 🏷fig:enter-label\\end{figure}'
'\\begin{figure} \\centeringedit \\caption{My caption} 🏷fig:placeholder\\end{figure}'
)
})