- ✅ Ticket 1.1: Estructura Clean Architecture en backend - ✅ Ticket 1.2: Schemas Zod compartidos - ✅ Ticket 1.3: Refactorización drugs.ts (1362 → 8 archivos modulares) - ✅ Ticket 1.4: Refactorización procedures.ts (3583 → 6 archivos modulares) - ✅ Ticket 1.5: Eliminación de duplicidades (~50 líneas) Cambios principales: - Creada estructura Clean Architecture en backend/src/ - Schemas Zod compartidos en backend/src/shared/schemas/ - Refactorización modular de drugs y procedures - Utilidades genéricas en src/utils/ (filter, validation) - Eliminados scripts obsoletos y documentación antigua - Corregidos errores: QueryClient, import test-error-handling - Build verificado y funcionando correctamente
84 lines
1.4 KiB
JavaScript
84 lines
1.4 KiB
JavaScript
/*
|
|
Language: NestedText
|
|
Description: NestedText is a file format for holding data that is to be entered, edited, or viewed by people.
|
|
Website: https://nestedtext.org/
|
|
Category: config
|
|
*/
|
|
|
|
/** @type LanguageFn */
|
|
function nestedtext(hljs) {
|
|
const NESTED = {
|
|
match: [
|
|
/^\s*(?=\S)/, // have to look forward here to avoid polynomial backtracking
|
|
/[^:]+/,
|
|
/:\s*/,
|
|
/$/
|
|
],
|
|
className: {
|
|
2: "attribute",
|
|
3: "punctuation"
|
|
}
|
|
};
|
|
const DICTIONARY_ITEM = {
|
|
match: [
|
|
/^\s*(?=\S)/, // have to look forward here to avoid polynomial backtracking
|
|
/[^:]*[^: ]/,
|
|
/[ ]*:/,
|
|
/[ ]/,
|
|
/.*$/
|
|
],
|
|
className: {
|
|
2: "attribute",
|
|
3: "punctuation",
|
|
5: "string"
|
|
}
|
|
};
|
|
const STRING = {
|
|
match: [
|
|
/^\s*/,
|
|
/>/,
|
|
/[ ]/,
|
|
/.*$/
|
|
],
|
|
className: {
|
|
2: "punctuation",
|
|
4: "string"
|
|
}
|
|
};
|
|
const LIST_ITEM = {
|
|
variants: [
|
|
{ match: [
|
|
/^\s*/,
|
|
/-/,
|
|
/[ ]/,
|
|
/.*$/
|
|
] },
|
|
{ match: [
|
|
/^\s*/,
|
|
/-$/
|
|
] }
|
|
],
|
|
className: {
|
|
2: "bullet",
|
|
4: "string"
|
|
}
|
|
};
|
|
|
|
return {
|
|
name: 'Nested Text',
|
|
aliases: [ 'nt' ],
|
|
contains: [
|
|
hljs.inherit(hljs.HASH_COMMENT_MODE, {
|
|
begin: /^\s*(?=#)/,
|
|
excludeBegin: true
|
|
}),
|
|
LIST_ITEM,
|
|
STRING,
|
|
NESTED,
|
|
DICTIONARY_ITEM
|
|
]
|
|
};
|
|
}
|
|
|
|
module.exports = nestedtext;
|