@peaceroad/markdown-it-strong-ja 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +5 -19
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1144,12 +1144,6 @@ const convertCollapsedReferenceLinks = (tokens, state) => {
1144
1144
  let existingLinkOpen = null
1145
1145
  let existingLinkClose = null
1146
1146
  const nextToken = tokens[refRemoveStart]
1147
- if (process.env.DEBUG_COLLAPSED === 'wide') {
1148
- const debugSlice = tokens.slice(i, Math.min(tokens.length, refRemoveStart + 3)).map((t) => `${t.type}:${t.content || ''}`)
1149
- console.log('debug collapsed ctx:', debugSlice)
1150
- console.log('next token info:', nextToken && nextToken.type, nextToken && JSON.stringify(nextToken.content))
1151
- }
1152
-
1153
1147
  if (isBracketToken(nextToken, '[]')) {
1154
1148
  refKey = normalizeReferenceCandidate(state, cleanedLabel)
1155
1149
  refRemoveCount = 1
@@ -1183,11 +1177,6 @@ const convertCollapsedReferenceLinks = (tokens, state) => {
1183
1177
  i++
1184
1178
  continue
1185
1179
  }
1186
- if (process.env.DEBUG_COLLAPSED === '1') {
1187
- const context = tokens.slice(Math.max(0, i - 2), Math.min(tokens.length, closeIdx + 3))
1188
- console.log('[collapsed-ref] context:',
1189
- context.map((t) => t.type + ':' + (t.content || '')))
1190
- }
1191
1180
  let linkOpenToken = null
1192
1181
  let linkCloseToken = null
1193
1182
  if (existingLinkOpen && existingLinkClose) {
@@ -1244,14 +1233,11 @@ const convertCollapsedReferenceLinks = (tokens, state) => {
1244
1233
  if (!/_close$/.test(prevToken.type)) break
1245
1234
  const expectedOpen = prevToken.type.replace('_close', '_open')
1246
1235
  if (nextToken.type !== expectedOpen) break
1247
- if (process.env.DEBUG_COLLAPSED === '1') {
1248
- console.log('[collapsed-ref] wrapper pair:', prevToken.type, nextToken.type)
1249
- }
1250
- wrapperPairs.push({
1251
- base: prevToken.type.replace('_close', ''),
1252
- tag: prevToken.tag,
1253
- markup: prevToken.markup
1254
- })
1236
+ wrapperPairs.push({
1237
+ base: prevToken.type.replace('_close', ''),
1238
+ tag: prevToken.tag,
1239
+ markup: prevToken.markup
1240
+ })
1255
1241
  tokens.splice(labelEndIdx + 1, 1)
1256
1242
  tokens.splice(labelStartIdx - 1, 1)
1257
1243
  labelStartIdx -= 1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@peaceroad/markdown-it-strong-ja",
3
3
  "description": "This is a plugin for markdown-it. It is an alternative to the standard `**` (strong) and `*` (em) processing. It also processes strings that cannot be converted by the standard.",
4
- "version": "0.5.0",
4
+ "version": "0.5.1",
5
5
  "main": "index.js",
6
6
  "type": "module",
7
7
  "files": [