mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
Use "*:placeholder" as placeholder label (#27520)
GitOrigin-RevId: eb6566e8cab401675df21a54d0b1035fd6e8a8df
This commit is contained in:
@@ -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}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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}`,
|
||||
],
|
||||
[
|
||||
|
||||
@@ -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}'
|
||||
)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user