diff --git a/src/languages/mipsasm.js b/src/languages/mipsasm.js index f7444428bf..0a5cca74c9 100644 --- a/src/languages/mipsasm.js +++ b/src/languages/mipsasm.js @@ -36,18 +36,18 @@ export default function(hljs) { begin: '\\b('+ //mnemonics // 32-bit integer instructions 'addi?u?|andi?|b(al)?|beql?|bgez(al)?l?|bgtzl?|blezl?|bltz(al)?l?|' + - 'bnel?|cl[oz]|divu?|ext|ins|j(al)?|jalr(\.hb)?|jr(\.hb)?|lbu?|lhu?|' + + 'bnel?|cl[oz]|divu?|ext|ins|j(al)?|jalr(\\.hb)?|jr(\\.hb)?|lbu?|lhu?|' + 'll|lui|lw[lr]?|maddu?|mfhi|mflo|movn|movz|move|msubu?|mthi|mtlo|mul|' + 'multu?|nop|nor|ori?|rotrv?|sb|sc|se[bh]|sh|sllv?|slti?u?|srav?|' + 'srlv?|subu?|sw[lr]?|xori?|wsbh|' + // floating-point instructions - 'abs\.[sd]|add\.[sd]|alnv.ps|bc1[ft]l?|' + - 'c\.(s?f|un|u?eq|[ou]lt|[ou]le|ngle?|seq|l[et]|ng[et])\.[sd]|' + - '(ceil|floor|round|trunc)\.[lw]\.[sd]|cfc1|cvt\.d\.[lsw]|' + - 'cvt\.l\.[dsw]|cvt\.ps\.s|cvt\.s\.[dlw]|cvt\.s\.p[lu]|cvt\.w\.[dls]|' + - 'div\.[ds]|ldx?c1|luxc1|lwx?c1|madd\.[sd]|mfc1|mov[fntz]?\.[ds]|' + - 'msub\.[sd]|mth?c1|mul\.[ds]|neg\.[ds]|nmadd\.[ds]|nmsub\.[ds]|' + - 'p[lu][lu]\.ps|recip\.fmt|r?sqrt\.[ds]|sdx?c1|sub\.[ds]|suxc1|' + + 'abs\\.[sd]|add\\.[sd]|alnv.ps|bc1[ft]l?|' + + 'c\\.(s?f|un|u?eq|[ou]lt|[ou]le|ngle?|seq|l[et]|ng[et])\\.[sd]|' + + '(ceil|floor|round|trunc)\\.[lw]\\.[sd]|cfc1|cvt\\.d\\.[lsw]|' + + 'cvt\\.l\\.[dsw]|cvt\\.ps\\.s|cvt\\.s\\.[dlw]|cvt\\.s\\.p[lu]|cvt\\.w\\.[dls]|' + + 'div\\.[ds]|ldx?c1|luxc1|lwx?c1|madd\\.[sd]|mfc1|mov[fntz]?\\.[ds]|' + + 'msub\\.[sd]|mth?c1|mul\\.[ds]|neg\\.[ds]|nmadd\\.[ds]|nmsub\\.[ds]|' + + 'p[lu][lu]\\.ps|recip\\.fmt|r?sqrt\\.[ds]|sdx?c1|sub\\.[ds]|suxc1|' + 'swx?c1|' + // system control instructions 'break|cache|d?eret|[de]i|ehb|mfc0|mtc0|pause|prefx?|rdhwr|' + @@ -57,7 +57,7 @@ export default function(hljs) { end: '\\s' }, // lines ending with ; or # aren't really comments, probably auto-detect fail - hljs.COMMENT('[;#](?!\s*$)', '$'), + hljs.COMMENT('[;#](?!\\s*$)', '$'), hljs.C_BLOCK_COMMENT_MODE, hljs.QUOTE_STRING_MODE, { @@ -90,6 +90,6 @@ export default function(hljs) { relevance: 0 } ], - illegal: '\/' + illegal: /\// }; } diff --git a/src/languages/yaml.js b/src/languages/yaml.js index f482eac337..0951125ee4 100644 --- a/src/languages/yaml.js +++ b/src/languages/yaml.js @@ -102,7 +102,7 @@ export default function(hljs) { // Indentation of subsequent lines must be the same to // be considered part of the block className: 'string', - begin: '[\\|>]([0-9]?[+-])?[ ]*\\n( *)[\\S ]+\\n(\\2[\\S ]+\\n?)*' + begin: '[\\|>]([0-9]?[+-])?[ ]*\\n( *)[^\\n]+\\n(\\2[^\\n]+\\n?)*' }, { // Ruby/Rails erb begin: '<%[%=-]?',